spam minder v2

This commit is contained in:
Ticho Hidding
2025-10-27 17:21:50 +01:00
parent caa812217f
commit 6fb248bec4
3 changed files with 0 additions and 6 deletions

View File

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

View File

@@ -56,7 +56,6 @@ public final class SendChallengeView extends View {
final Button cancelButton = button(); final Button cancelButton = button();
cancelButton.setText(AppContext.getString("cancel")); cancelButton.setText(AppContext.getString("cancel"));
cancelButton.setOnAction(_ -> { cancelButton.setOnAction(_ -> {
IO.println("tried to click cancel");
ViewStack.pop(); }); ViewStack.pop(); });
final List<Node> nodes = new ArrayList<>(); 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); Move[] moves = sortMovesFromCenter(getFlipsForPotentialMove(new Point(move.position()%columnSize,move.position()/rowSize), makeBoardAGrid(), move.value()),move);
mostRecentlyFlippedPieces = moves; mostRecentlyFlippedPieces = moves;
board[move.position()] = move.value(); board[move.position()] = move.value();
IO.println(move.position() +" "+ move.value());
for (Move m : moves) { for (Move m : moves) {
board[m.position()] = m.value(); board[m.position()] = m.value();
} }
@@ -207,7 +206,6 @@ public final class Reversi extends TurnBasedGame {
public Move[] sortMovesFromCenter(Move[] moves, Move center) { public Move[] sortMovesFromCenter(Move[] moves, Move center) {
int centerX = center.position()%columnSize; int centerX = center.position()%columnSize;
int centerY = center.position()/rowSize; int centerY = center.position()/rowSize;
IO.println("pre "+Arrays.toString(moves));
Arrays.sort(moves, (a, b) -> { Arrays.sort(moves, (a, b) -> {
int dxA = a.position()%columnSize - centerX; int dxA = a.position()%columnSize - centerX;
int dyA = a.position()/rowSize - centerY; int dyA = a.position()/rowSize - centerY;
@@ -219,7 +217,6 @@ public final class Reversi extends TurnBasedGame {
return Integer.compare(distA, distB); return Integer.compare(distA, distB);
}); });
IO.println("post "+Arrays.toString(moves));
return moves; return moves;
} }
public Move[] getMostRecentlyFlippedPieces() { public Move[] getMostRecentlyFlippedPieces() {