Advertisement
Guest User

OthelloCore.java

a guest
Sep 15th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. package jp.starfree.cpsv;
  2.  
  3. import java.util.Scanner;
  4.  
  5. import javafx.application.Application;
  6. import javafx.fxml.FXMLLoader;
  7. import javafx.scene.Scene;
  8. import javafx.scene.layout.BorderPane;
  9. import javafx.stage.Stage;
  10.  
  11. public class OthelloCore extends Application {
  12.  
  13. /*
  14. * @author CreeperSaviour
  15. * @version 0.0.1
  16. */
  17.  
  18. private static Scanner sc = new Scanner(System.in);
  19.  
  20. public static void main(String[] args) {
  21. initialize();
  22. // game();
  23. // sc.close();
  24. launch(args);
  25. }
  26.  
  27. @Override
  28. public void start(Stage stage) {
  29. try {
  30. var loader = new FXMLLoader(getClass().getResource("Othello.fxml"));
  31. Data.control = loader.getController();
  32. stage.setScene(new Scene((BorderPane)loader.load(), 800, 600));
  33. stage.show();
  34. stage.setTitle("Othello");
  35. } catch(Exception e) {
  36. e.printStackTrace();
  37. System.exit(-1);
  38. }
  39. }
  40.  
  41. public static void initialize() {
  42. Data.field = new Field();
  43. System.out.println("[Debug]");
  44. for(var i = 0; i < 10; i++) {
  45. for(var j = 0; j < 10; j++) {
  46. System.out.print(Data.field.getSquare(i, j));
  47. }
  48. System.out.println();
  49. }
  50. System.out.println();
  51. }
  52.  
  53. public static void game() {
  54. while(true) {
  55.  
  56. if(sc.nextLine().equals("f")) break;
  57. }
  58. }
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement