예제 #1
0
파일: Game.cs 프로젝트: ClementMJ/DPSDP
 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
 }
예제 #2
0
 public PlayerIterator(CollectionPlayer players)
 {
     this.players = players;
 }