コード例 #1
0
ファイル: TejoGame.cs プロジェクト: xyos/tejo4kinect
 // 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];
 }
コード例 #2
0
ファイル: TejoGame.cs プロジェクト: xyos/tejo4kinect
 public void NewTurn()
 {
     this.Turn++;
     this.ActivePlayer = this._players[(this.Turn - 1) % this._players.Count];
 }