Commit 905bc1c6 authored by Anna Maria Eilertsen's avatar Anna Maria Eilertsen
Browse files

fixed bug where AI wins in connect 4: found by Sondre

parent f7d55334
......@@ -142,7 +142,7 @@ public class TwoPlayerGame<T extends MNKGame> {
HumanPlayer pl = (HumanPlayer) currentPlayer;
pl.makeMove(currentGame, x, y);
currentPlayer = next();
if(currentPlayer instanceof AIPlayer) {
if(hasPossibleMoves() && currentPlayer instanceof AIPlayer) {
takeTurnForAI();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment