Skip to content
Snippets Groups Projects
Commit 34ef86f7 authored by jan-schw's avatar jan-schw
Browse files

add missing curly brace

parent 57052dc0
No related branches found
No related tags found
2 merge requests!6Add final version of the game to main branch,!5Add basic implementation
......@@ -38,25 +38,24 @@ public class TicTacToeFX extends Application {
if (gameEvent.getEventType() == GameEvent.VICTORY_EVENT) {
dialogVbox.getChildren().add(new Text("This is a victory for player " + currentPlayer + " in turn " + this.currentTurn + "!"));
} else if (gameEvent.getEventType() == GameEvent.DRAW_EVENT) {
if(gameEvent.getEventType() == GameEvent.VICTORY_EVENT) {
dialogVbox.getChildren().add(new Text("This is a victory for player " + currentPlayer + "!"));
}
else if(gameEvent.getEventType() == GameEvent.DRAW_EVENT) {
dialogVbox.getChildren().add(new Text("This is a Draw!"));
}
if (gameEvent.getEventType() == GameEvent.VICTORY_EVENT) {
dialogVbox.getChildren().add(new Text("This is a victory for player " + currentPlayer + "!"));
} else if (gameEvent.getEventType() == GameEvent.DRAW_EVENT) {
dialogVbox.getChildren().add(new Text("This is a Draw!"));
}
Button closeButton = new Button();
closeButton.setText("Close");
closeButton.setOnAction(event -> primaryStage.close());
dialogVbox.getChildren().add(closeButton);
dialogVbox.setAlignment(Pos.CENTER);
Button closeButton = new Button();
closeButton.setText("Close");
closeButton.setOnAction(event -> primaryStage.close());
dialogVbox.getChildren().add(closeButton);
dialogVbox.setAlignment(Pos.CENTER);
Scene dialogScene = new Scene(dialogVbox, 200, 100);
dialog.setScene(dialogScene);
dialog.show();
Scene dialogScene = new Scene(dialogVbox, 200, 100);
dialog.setScene(dialogScene);
dialog.show();
}
};
// Erstelle das das Spielfeld
GridPane grid = new GridPane();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment