Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Johan Gustav Thrane-Nielsen
inf101.v20.sem2.losning
Commits
905bc1c6
Commit
905bc1c6
authored
Mar 31, 2020
by
Anna Maria Eilertsen
Browse files
fixed bug where AI wins in connect 4: found by Sondre
parent
f7d55334
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/inf101/v20/sem2/twoPlayerGame/TwoPlayerGame.java
View file @
905bc1c6
...
...
@@ -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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment