AIsOfCatan.MainActions.PlayYearOfPlenty C# (CSharp) Метод

PlayYearOfPlenty() публичный Метод

public PlayYearOfPlenty ( Resource resource1, Resource resource2 ) : GameState
resource1 Resource
resource2 Resource
Результат 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);
        }