예제 #1
0
        private void UpdateGrid()
        {
            _gridController.GenerateGrid();

            switch (_gameController.CurrentState)
            {
            case Shared.Enums.StateEnum.Player1Place:
            case Shared.Enums.StateEnum.Player2Place:
                _gridController.SetHoverEvents(false);
                break;

            case Shared.Enums.StateEnum.PlayerAttack:
                _gridController.LoadShipsToAttack(_gameController.GetEnemyShips());
                _gridController.SetHoverEvents(true);
                _gridController.Hide();
                break;

            case Shared.Enums.StateEnum.Finished:
                _gridController.LoadShipsToAttack(_gameController.GetEnemyShips());
                _gridController.SetHoverEvents(false);
                break;
            }
        }