示例#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;
 }