Example #1
0
 public Game(int size, int nbPlayers, int nbRounds)
 {
     this.board      = new Board(size);                  // A game is defined by a board
     this.nbRounds   = nbRounds;                         // A game has a number of rounds
     this.playerList = new CollectionPlayer();           // We use a collection a player to save the list
     this.iterator   = this.playerList.CreateIterator(); // We add an iterator pattern to iterate within the collection
     CreatePlayer(nbPlayers);                            // Method to create players
 }
Example #2
0
 public PlayerIterator(CollectionPlayer players)
 {
     this.players = players;
 }