Example #1
0
        public void SwitchStones(Connect4Game gameLogic)
        {
            var yPos = 0;//gameSettings.ROWS * gameSettings.rowDistance;
            var xPos = 3 * this.ColumnDistance;

            // 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];
            }
            ActiveStone.Enable(true);
        }
Example #2
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);
 }