[MH2] Implemented Dihada's Ploy

This commit is contained in:
Evan Kranzler 2021-06-03 09:05:07 -04:00
parent 54e5214227
commit 390075efd4
3 changed files with 77 additions and 0 deletions

View file

@ -37,4 +37,9 @@ public class DiscardedCardWatcher extends Watcher {
DiscardedCardWatcher watcher = game.getState().getWatcher(DiscardedCardWatcher.class);
return watcher != null && watcher.playerMap.getOrDefault(playerId, 0) > 0;
}
public static int getDiscarded(UUID playerId, Game game) {
DiscardedCardWatcher watcher = game.getState().getWatcher(DiscardedCardWatcher.class);
return watcher == null ? 0 : watcher.playerMap.getOrDefault(playerId, 0);
}
}