mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
iets met timing verkeerd temporary fix
This commit is contained in:
@@ -152,6 +152,7 @@ public final class Server {
|
|||||||
information.players[0].name = user;
|
information.players[0].name = user;
|
||||||
information.players[0].isHuman = false;
|
information.players[0].isHuman = false;
|
||||||
information.players[0].computerDifficulty = 5;
|
information.players[0].computerDifficulty = 5;
|
||||||
|
information.players[0].computerThinkTime = 1;
|
||||||
information.players[1].name = response.opponent();
|
information.players[1].name = response.opponent();
|
||||||
|
|
||||||
Runnable onGameOverRunnable = isSingleGame.get()? null: this::gameOver;
|
Runnable onGameOverRunnable = isSingleGame.get()? null: this::gameOver;
|
||||||
|
|||||||
@@ -230,12 +230,7 @@ public final class TicTacToeGame {
|
|||||||
} catch (InterruptedException _) {}
|
} catch (InterruptedException _) {}
|
||||||
} else {
|
} else {
|
||||||
final Game.Move move;
|
final Game.Move move;
|
||||||
if (information.players[1].name.equalsIgnoreCase("pism")) {
|
|
||||||
move = ai.findWorstMove(game,9);
|
|
||||||
}else{
|
|
||||||
move = ai.findBestMove(game, information.players[0].computerDifficulty);
|
move = ai.findBestMove(game, information.players[0].computerDifficulty);
|
||||||
}
|
|
||||||
|
|
||||||
assert move != null;
|
assert move != null;
|
||||||
position = move.position();
|
position = move.position();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user