package net.starbs.antipleurdawn;

import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.SceneAntialiasing;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import javafx.stage.Stage;
import net.starbs.antipleurdawn.client.Client;
import net.starbs.antipleurdawn.client.ClientFactoryEE;
import net.starbs.antipleurdawn.events.GameUpdated;

public class Main extends Application {

    Board board;
    TakenPieces whiteTakenPieces;
    TakenPieces blackTakenPieces;
    Client client;

    public Main() {
        super();
        board = new Board();
        whiteTakenPieces = new TakenPieces();
        blackTakenPieces = new TakenPieces();
        client = ClientFactoryEE.make();
    }

    @Override
    public void start(Stage primaryStage) throws Exception{
        BorderPane top = new BorderPane();

        Label chessLabel = new Label("Anti Chess");
        chessLabel.setAlignment(Pos.TOP_RIGHT);
        chessLabel.setId("title");

        top.setLeft(chessLabel);

        BorderPane root = new BorderPane();
        root.setTop(top);
        root.setCenter(board.pane);

        Scene main = new Scene(root, 550, 500, false, SceneAntialiasing.BALANCED);

        main.getStylesheets().add("file:src/main.css");
        primaryStage.setScene(main);
        primaryStage.setTitle("Anti Chess");
        primaryStage.show();
        board.squares[0][0].setPiece(new Piece(PieceType.PAWN, PlayerType.WHITE));
    }

    public static void main(String[] args) {
        launch(args);
    }
}

@@ -553,16 +553,100 @@
  client;
+%0A    BorderPane root;%0A    BorderPane top;%0A    BorderPane left;%0A    BorderPane right;
 %0A%0A    pu
@@ -834,24 +834,156 @@
 yEE.make();%0A
+        root = new BorderPane();%0A        top = new BorderPane();%0A        left = new BorderPane();%0A        right = new BorderPane();%0A
     %7D%0A%0A    @
@@ -1055,52 +1055,8 @@
 on%7B%0A
-        BorderPane top = new BorderPane();%0A%0A
     
@@ -1225,52 +1225,8 @@
 );%0A%0A
-        BorderPane root = new BorderPane();%0A
     
@@ -1531,24 +1531,24 @@
 age.show();%0A
-
         boar
@@ -1621,24 +1621,282 @@
 E));%0A    %7D%0A%0A
+    void onGameUpdated(GameUpdated event) %7B%0A        board.onGameUpdated(event);%0A        if(event.getCurrentPlayer() == client.getPlayer()) %7B%0A            // TODO: get player's move%0A        %7D else %7B%0A            // TODO: display waiting screen%0A        %7D%0A    %7D%0A%0A
     public s

Update Main structure