Esempio n. 1
0
        public void DequeueLastAction()
        {
            if (actionQueue.IsEmpty())
            {
                throw new System.Exception("Dequeueing action when size is 0");
            }
            ActionType lastActionType       = actionQueue.GetBackActionType();
            int        lastActionPointsUsed = actionQueue.GetBackPointsUsed();

            if (lastActionType == ActionType.MOVE)
            {
                ++numMovesLeft;
            }
            else
            {
                numActionsLeft += lastActionPointsUsed;
            }
            actionQueue.DequeueBackAction();
            // GetCellLocation looks into the actionQueue's last cell position
            LinkToNewCellLocation(GetProjectedLocation());
        }