Merge remote-tracking branch 'origin/Demo3' into Demo3

This commit is contained in:
ramollia
2025-10-27 17:22:35 +01:00
3 changed files with 0 additions and 6 deletions

View File

@@ -230,9 +230,7 @@ public final class TicTacToeGame {
} catch (InterruptedException _) {}
} else {
final Game.Move move;
IO.println(information.players[0].name + " " + information.players[1].name);
if (information.players[1].name.equalsIgnoreCase("pism")) {
IO.println("got worst move");
move = ai.findWorstMove(game,9);
}else{
move = ai.findBestMove(game, information.players[0].computerDifficulty);

View File

@@ -56,7 +56,6 @@ public final class SendChallengeView extends View {
final Button cancelButton = button();
cancelButton.setText(AppContext.getString("cancel"));
cancelButton.setOnAction(_ -> {
IO.println("tried to click cancel");
ViewStack.pop(); });
final List<Node> nodes = new ArrayList<>();

View File

@@ -142,7 +142,6 @@ public final class Reversi extends TurnBasedGame {
Move[] moves = sortMovesFromCenter(getFlipsForPotentialMove(new Point(move.position()%columnSize,move.position()/rowSize), makeBoardAGrid(), move.value()),move);
mostRecentlyFlippedPieces = moves;
board[move.position()] = move.value();
IO.println(move.position() +" "+ move.value());
for (Move m : moves) {
board[m.position()] = m.value();
}
@@ -207,7 +206,6 @@ public final class Reversi extends TurnBasedGame {
public Move[] sortMovesFromCenter(Move[] moves, Move center) {
int centerX = center.position()%columnSize;
int centerY = center.position()/rowSize;
IO.println("pre "+Arrays.toString(moves));
Arrays.sort(moves, (a, b) -> {
int dxA = a.position()%columnSize - centerX;
int dyA = a.position()/rowSize - centerY;
@@ -219,7 +217,6 @@ public final class Reversi extends TurnBasedGame {
return Integer.compare(distA, distB);
});
IO.println("post "+Arrays.toString(moves));
return moves;
}
public Move[] getMostRecentlyFlippedPieces() {