|
|
@ -22,7 +22,16 @@ public class GameService { |
|
|
|
// add lastPlayedCard back to drawCardDeck |
|
|
|
game.setLastPlayedCard(card); |
|
|
|
// check for special rules (draw, colorchoose, skip,...) |
|
|
|
} |
|
|
|
|
|
|
|
public boolean allowedMove(Player player, Card card) |
|
|
|
{ |
|
|
|
boolean isAllowed = false; |
|
|
|
Card lastCard = game.getLastPlayedCard(); |
|
|
|
// rules: |
|
|
|
if (card.getColor() == lastCard.getColor()) isAllowed = true; // same color |
|
|
|
|
|
|
|
return isAllowed; |
|
|
|
} |
|
|
|
|
|
|
|
} |