コード例 #1
0
 private void setup() {
   for (IPlayer player : this.ascPlayers()) {
     Collection<ISquare> possible = this.squares.all();
     for (int n = 0; n < AMOEBAS_AT_START; n++) {
       IAmoeba amoeba = player.placeInitial(possible);
       possible.remove(amoeba.getSquare());
       notifyObservers(new InitialPlacement(player, amoeba));
     }
   }
 }
コード例 #2
0
 @Inject
 public Game(
     Collection<IPlayer> players,
     List<IPhase> phases,
     ScoreBoard scoreboard,
     Stack<EnvironmentCard> environmentCards,
     Collection<IGeneCard> genes,
     IBoard board) {
   this.phases = phases;
   this.scoreboard = scoreboard;
   this.environmentCards = environmentCards;
   this.availableGenes = genes;
   this.squares = board;
   for (IPlayer player : players) {
     player.enter(this);
     this.scoreboard.add(player);
   }
 }