Пример #1
0
 private void Init()
 {
     if(gameSettings.STARTING_PLAYER == gameSettings.RED_PLAYER)
         this.ActiveStone = this.RedStones[0];
     if(gameSettings.STARTING_PLAYER == gameSettings.YELLOW_PLAYER)
         this.ActiveStone = this.YellowStones[0];
     this.ActiveStone.Enable(true);
 }
Пример #2
0
        public void SwitchStones(Connect4Game gameLogic)
        {
            var yPos = 55;
            var xPos = 0;

            // Enable next stone
            if (gameLogic.activePlayer == gameSettings.RED_PLAYER)
            {
                RedStones[gameLogic.turn].SetPosition(xPos, yPos);

                RedStones[gameLogic.turn].Enable(true);

                ActiveStone = RedStones[gameLogic.turn];

            }
            else
            {
                YellowStones[gameLogic.turn].SetPosition(xPos, yPos);

                YellowStones[gameLogic.turn].Enable(true);

                ActiveStone = YellowStones[gameLogic.turn];
            }
        }