コード例 #1
0
 public static void InitialiseAllPlayers()
 {
     _player1 = new Player(PlayerIndex.One);
     _player2 = new Player(PlayerIndex.Two);
     _player3 = new Player(PlayerIndex.Three);
     _player4 = new Player(PlayerIndex.Four);
 }
コード例 #2
0
        public static void InitialisePlayer(PlayerIndex index)
        {
            switch (index)
            {
                case PlayerIndex.One:
                    _player1 = new Player(index);
                    break;

                case PlayerIndex.Two:
                    _player2 = new Player(index);
                    break;

                case PlayerIndex.Three:
                    _player3 = new Player(index);
                    break;

                case PlayerIndex.Four:
                    _player4 = new Player(index);
                    break;
            }
        }