fixed bug with seven counter

This commit is contained in:
Johannes Schmelz 2024-06-19 11:43:35 +02:00
parent 094c17d16a
commit e58808bbbc
2 changed files with 12 additions and 8 deletions

View File

@ -165,6 +165,8 @@ 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 (ctr7 == 0 || c.rank() == Rank.SEVEN) {
if (chosenSuit == null) { if (chosenSuit == null) {
if (c.rank() == Rank.JACK) { if (c.rank() == Rank.JACK) {
return true; return true;
@ -174,6 +176,8 @@ public class ActionHandler {
return true; return true;
} }
} }
}
if (c.suit() == chosenSuit) { if (c.suit() == chosenSuit) {
return true; return true;