Esempio n. 1
0
 // Constructor
 public TejoGame(int playersCount)
 {
     if (playersCount > 4 && playersCount < 1)
     {
         throw new Exception("bad number of players");
     }
     for (int i = 0; i < playersCount; i++)
     {
         var player = new Player();
         Debug.Log(player);
         this._players.Add(player);
     }
     this.Turn = 0;
     this.ActivePlayer = this._players[0];
 }
Esempio n. 2
0
 public void NewTurn()
 {
     this.Turn++;
     this.ActivePlayer = this._players[(this.Turn - 1) % this._players.Count];
 }