Пример #1
0
        void Start()
        {
            //Initializing Lists
            players     = new List <Player>();
            moveHistory = new List <Move>();

            //Initializing Boards
            internalBoard = new InternalBoard();

            //Setting up the players
            foreach (var playerDetail in GlobalVars.playerDetails)
            {
                if (playerDetail.isHuman)
                {
                    players.Add(new HumanPlayer(playerDetail.id, playerDetail.colour, internalBoard));
                }
                else
                {
                    players.Add(new ComputerPlayer(playerDetail.id, playerDetail.colour, internalBoard));
                }
            }

            //Setting up the current Player
            currentPlayer = players[0];
        }
Пример #2
0
        public Player(int playerId, PieceColour colour, InternalBoard internalBoard)
        {
            this.playerId      = playerId;
            this.colour        = colour;
            this.internalBoard = internalBoard;

            //Setting up the pieces depending on the game and colour
            switch (GlobalVars.gameType)
            {
            case (GameType.Standard):
                setUpStandardGame();
                break;

            case (GameType.FourPlayer):
                setUpFourPlayerGame();
                break;

            case (GameType.NineSixty):
                break;

            case (GameType.FourPointFive):
                break;
            }
        }
Пример #3
0
 public HumanPlayer(int playerId, PieceColour colour, InternalBoard internalBoard) :
     base(playerId, colour, internalBoard)
 {
     highlightsManager = BoardHighlights.Instance;
 }
Пример #4
0
 public ComputerPlayer(int playerId, PieceColour colour, InternalBoard internalBoard) :
     base(playerId, colour, internalBoard)
 {
 }