|
@ -61,6 +61,7 @@ public class PlayerService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void botMove() { |
|
|
public void botMove() { |
|
|
|
|
|
Card lastPlayedCard = game.getLastPlayedCard(); |
|
|
for (int i = 0; i < this.playerList.getLast().getPlayerDeck().size(); i++) { |
|
|
for (int i = 0; i < this.playerList.getLast().getPlayerDeck().size(); i++) { |
|
|
if (getGame().getGameService().legalMove(this.playerList.getLast().getPlayerDeck().get(i))) { |
|
|
if (getGame().getGameService().legalMove(this.playerList.getLast().getPlayerDeck().get(i))) { |
|
|
Card playCard = this.playerList.getLast().getPlayerDeck().get(i); |
|
|
Card playCard = this.playerList.getLast().getPlayerDeck().get(i); |
|
@ -69,5 +70,8 @@ public class PlayerService { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (lastPlayedCard == game.getLastPlayedCard()) { |
|
|
|
|
|
game.getGameService().drawCard(1); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |