fixed bug with seven counter
This commit is contained in:
parent
094c17d16a
commit
e58808bbbc
Binary file not shown.
@ -165,16 +165,20 @@ public class ActionHandler {
|
|||||||
* @return True if the card can be played, false otherwise.
|
* @return True if the card can be played, false otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean canPlay(Card c) {
|
public boolean canPlay(Card c) {
|
||||||
if (chosenSuit == null) {
|
if (ctr7 == 0 || c.rank() == Rank.SEVEN) {
|
||||||
if (c.rank() == Rank.JACK) {
|
|
||||||
return true;
|
if (chosenSuit == null) {
|
||||||
} else if (c.rank() == game.getCardHandler().getDiscardPile().getFirst().rank()) {
|
if (c.rank() == Rank.JACK) {
|
||||||
return true;
|
return true;
|
||||||
} else if (c.suit() == game.getCardHandler().getDiscardPile().getFirst().suit()) {
|
} else if (c.rank() == game.getCardHandler().getDiscardPile().getFirst().rank()) {
|
||||||
return true;
|
return true;
|
||||||
|
} else if (c.suit() == game.getCardHandler().getDiscardPile().getFirst().suit()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (c.suit() == chosenSuit) {
|
if (c.suit() == chosenSuit) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user