|
@ -63,7 +63,9 @@ public class PlayerService { |
|
|
public void botMove() { |
|
|
public void botMove() { |
|
|
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))) { |
|
|
this.removeCardFromPlayerDeck(this.playerList.getLast().getPlayerDeck().get(i)); |
|
|
|
|
|
|
|
|
Card playCard = this.playerList.getLast().getPlayerDeck().get(i); |
|
|
|
|
|
this.removeCardFromPlayerDeck(playCard); |
|
|
|
|
|
getGame().getGameService().playCard(playCard); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|