Esempio n. 1
0
        override public void Select(Tile tile)
        {
            if (_playerPiece != null && _currentMoveComand != null)
            {
                var tiles = _currentMoveComand.Tiles(_board, _playerPiece);

                _board.UnHightlight(tiles);

                if (tiles.Contains(tile))
                {
                    _currentMoveComand.Execute(_board, _playerPiece, tile);

                    GameLoop.Instance.Board.Deck.Take((_currentMoveComand).GetCard());
                    _movesLeft--;
                }



                _currentMoveComand = null;

                _moveManager.ActivateFor(_playerPiece);


                if (_movesLeft == 0)
                {
                    StateMachine.MoveTo(GameStates.EnemyPhase1);
                }
            }
        }
Esempio n. 2
0
        override public void Select(IMoveCommand <Piece> moveComand)
        {
            if (_currentMoveComand != null)
            {
                _board.UnHightlight(_currentMoveComand.Tiles(_board, _playerPiece));
            }

            _currentMoveComand = moveComand;

            if (_currentMoveComand != null)
            {
                _board.Highlight(_currentMoveComand.Tiles(_board, _playerPiece));
            }
        }