Example #1
0
    public static GameSettings Make(GameConfigs configs)
    {
        eGame gameType = configs._gameType;

        if (gameType == eGame.Sandbox)
        {
            return(new GameSettings(configs));
        }
        else if (gameType == eGame.Exodus)
        {
            return(new GameSettings(eGame.Exodus,
                                    eEndCondition.Survival,
                                    new MapSettings(configs._mapConfigs),
                                    PlayerSettings.ExodusSettings(),
                                    TickSettings.ExodusSettings()));
        }
        else if (gameType == eGame.HotSeat)
        {
            return(new GameSettings(eGame.HotSeat,
                                    eEndCondition.LastOneStanding,
                                    MapSettings.HotseatSettings(),
                                    new PlayerSettings(configs._playerConfigs),
                                    TickSettings.HotseatSettings()));
        }
        else
        {
            throw new System.NotImplementedException();
        }
    }