AIsOfCatan.MainActions.PlayYearOfPlenty C# (CSharp) Method

PlayYearOfPlenty() public method

public PlayYearOfPlenty ( Resource resource1, Resource resource2 ) : GameState
resource1 Resource
resource2 Resource
return GameState
        public GameState PlayYearOfPlenty(Resource resource1, Resource resource2)
        {
            if (!valid) throw new IllegalActionException("Tried to perform an action on an invalid GameAction");
            if (hasPlayedDevCard)
                throw new IllegalActionException("Max one development card can be played each turn");
            hasPlayedDevCard = true;
            return controller.PlayYearOfPlenty(player, resource1, resource2);
        }