fixed reversi colors being switched, causing multiple issues

This commit is contained in:
Ticho Hidding
2025-12-08 17:14:31 +01:00
parent 3a8b1c2454
commit adc7b1a8f3
3 changed files with 12 additions and 13 deletions

View File

@@ -89,12 +89,6 @@ public final class App extends Application {
setKeybinds(root);
stage.setFullScreenExitKeyCombination(
new KeyCodeCombination(
KeyCode.F11
)
);
LoadingWidget loading = new LoadingWidget(Primitive.text(
"Loading...", false), 0, 0, Integer.MAX_VALUE, false, false // Just set a high default
);
@@ -154,6 +148,11 @@ public final class App extends Application {
escapePopup();
}
});
stage.setFullScreenExitKeyCombination(
new KeyCodeCombination(
KeyCode.F11
)
);
}
public void escapePopup() {

View File

@@ -65,9 +65,9 @@ public class ReversiController extends AbstractGameController<ReversiR> {
canvas.clearAll();
for (int i = 0; i < game.getBoard().length; i++) {
if (game.getBoard()[i] == 0) {
if (game.getBoard()[i] == 1) {
canvas.drawDot(Color.WHITE, i);
} else if (game.getBoard()[i] == 1) {
} else if (game.getBoard()[i] == 0) {
canvas.drawDot(Color.BLACK, i);
}
}
@@ -109,7 +109,7 @@ public class ReversiController extends AbstractGameController<ReversiR> {
public void drawLegalPosition(int cell, int player) {
Color innerColor;
if (player == 1) {
if (player == 0) {
innerColor = new Color(0.0f, 0.0f, 0.0f, 0.6f);
}
else {