예제 #1
0
 /**
  * List the active opponents
  *
  * @return list of active players not including the current player
  */
 public List<Player> getActiveOpponents() {
   return game.getActivePlayers()
       .stream()
       .filter(p -> !p.equals(player))
       .collect(Collectors.toList());
 }
예제 #2
0
 public List<Player> getActivePlayers() {
   return game.getActivePlayers();
 }
예제 #3
0
 public PlayingContext(BangGame game, Player player) {
   this.game = game;
   this.player = player;
   this.discardPile = game.getDiscardPile();
   this.drawPile = game.getDrawPile();
 }