Пример #1
0
        private void SwitchTurn(IEnumerable <Cell> allowedCells, ChipColor currentPlayerColor)
        {
            // display info whose is current turn
            playerInfo.UpdateCurrentTurnColor(currentPlayerColor);

            //if it's not your turn and it's human vs robot mode => so robot should put chip now
            if ((currentPlayerColor != playerColor) && (currentMode == GameMode.HumanToRobot))
            {
                //skip next step, player should not see allowed cells for robot
                return;
            }

            // make enable new colliders for player
            gameBoard.AllowCells(allowedCells);
        }
Пример #2
0
 public void UpdateCurrentTurnColor(ChipColor color)
 {
     CurrentTurn.text = color.ToString();
 }
Пример #3
0
 private void SetPlayerColor(ChipColor newPlayerColor)
 {
     playerColor = newPlayerColor;
 }