|
|
@ -59,34 +59,33 @@ public class GameService { |
|
|
|
game.setLastPlayedCard(card); |
|
|
|
// check for special rules (draw, colorchoose, skip,...) |
|
|
|
// Skip |
|
|
|
if (card.getValue() == Card.Value.SKIP) { |
|
|
|
|
|
|
|
switch (card.getValue()) { |
|
|
|
case SKIP: |
|
|
|
nextPlayer(); |
|
|
|
nextPlayer(); |
|
|
|
} |
|
|
|
// Reverse |
|
|
|
if (card.getValue() == Card.Value.REVERSE) { |
|
|
|
break; |
|
|
|
case REVERSE: |
|
|
|
nextPlayer(); |
|
|
|
nextPlayer(); |
|
|
|
} |
|
|
|
// Choose |
|
|
|
if (card.getValue() == Card.Value.CHOOSE) { |
|
|
|
break; |
|
|
|
case CHOOSE: |
|
|
|
// Abfrage Farbe |
|
|
|
Card.Color color = Card.Color.BLUE; //Vorübergehend Blau |
|
|
|
game.changeLastPlayedCardColor(color); |
|
|
|
nextPlayer(); |
|
|
|
} |
|
|
|
// Draw |
|
|
|
if (card.getValue() == Card.Value.DRAWTWO) { |
|
|
|
nextPlayer(); |
|
|
|
drawCard(2); |
|
|
|
} |
|
|
|
// ChooseDraw |
|
|
|
if (card.getValue() == Card.Value.CHOOSEDRAW) { |
|
|
|
break; |
|
|
|
case CHOOSEDRAW: |
|
|
|
// Abfrage Farbe |
|
|
|
Card.Color color = Card.Color.BLUE; //Vorübergehend Blau |
|
|
|
game.changeLastPlayedCardColor(color); |
|
|
|
Card.Color color1 = Card.Color.BLUE; //Vorübergehend Blau |
|
|
|
game.changeLastPlayedCardColor(color1); |
|
|
|
nextPlayer(); |
|
|
|
drawCard(4); |
|
|
|
break; |
|
|
|
case DRAWTWO: |
|
|
|
nextPlayer(); |
|
|
|
drawCard(2); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|