mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
fixed reversi colors being switched, causing multiple issues
This commit is contained in:
@@ -89,12 +89,6 @@ public final class App extends Application {
|
|||||||
|
|
||||||
setKeybinds(root);
|
setKeybinds(root);
|
||||||
|
|
||||||
stage.setFullScreenExitKeyCombination(
|
|
||||||
new KeyCodeCombination(
|
|
||||||
KeyCode.F11
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
LoadingWidget loading = new LoadingWidget(Primitive.text(
|
LoadingWidget loading = new LoadingWidget(Primitive.text(
|
||||||
"Loading...", false), 0, 0, Integer.MAX_VALUE, false, false // Just set a high default
|
"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();
|
escapePopup();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
stage.setFullScreenExitKeyCombination(
|
||||||
|
new KeyCodeCombination(
|
||||||
|
KeyCode.F11
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void escapePopup() {
|
public void escapePopup() {
|
||||||
|
|||||||
@@ -65,9 +65,9 @@ public class ReversiController extends AbstractGameController<ReversiR> {
|
|||||||
canvas.clearAll();
|
canvas.clearAll();
|
||||||
|
|
||||||
for (int i = 0; i < game.getBoard().length; i++) {
|
for (int i = 0; i < game.getBoard().length; i++) {
|
||||||
if (game.getBoard()[i] == 0) {
|
if (game.getBoard()[i] == 1) {
|
||||||
canvas.drawDot(Color.WHITE, i);
|
canvas.drawDot(Color.WHITE, i);
|
||||||
} else if (game.getBoard()[i] == 1) {
|
} else if (game.getBoard()[i] == 0) {
|
||||||
canvas.drawDot(Color.BLACK, i);
|
canvas.drawDot(Color.BLACK, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@ public class ReversiController extends AbstractGameController<ReversiR> {
|
|||||||
|
|
||||||
public void drawLegalPosition(int cell, int player) {
|
public void drawLegalPosition(int cell, int player) {
|
||||||
Color innerColor;
|
Color innerColor;
|
||||||
if (player == 1) {
|
if (player == 0) {
|
||||||
innerColor = new Color(0.0f, 0.0f, 0.0f, 0.6f);
|
innerColor = new Color(0.0f, 0.0f, 0.0f, 0.6f);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ public final class ReversiR extends AbstractGame<ReversiR> {
|
|||||||
|
|
||||||
|
|
||||||
private void addStartPieces() {
|
private void addStartPieces() {
|
||||||
this.setBoard(27, 1);
|
this.setBoard(27, 0);
|
||||||
this.setBoard(28, 0);
|
this.setBoard(28, 1);
|
||||||
this.setBoard(35, 0);
|
this.setBoard(35, 1);
|
||||||
this.setBoard(36, 1);
|
this.setBoard(36, 0);
|
||||||
updateFilledCellsSet();
|
updateFilledCellsSet();
|
||||||
}
|
}
|
||||||
private void updateFilledCellsSet() {
|
private void updateFilledCellsSet() {
|
||||||
|
|||||||
Reference in New Issue
Block a user