Example #1
0
        private Race MakeRace(string type, int length, string route, int prizePool, int specialRaceParameter)
        {
            Race resultRace = null;

            switch (type)
            {
            case "TimeLimit":
                resultRace = RaceFactory.MakeTimeLimitRace(length, route, prizePool, specialRaceParameter);
                break;

            case "Circuit":
                resultRace = RaceFactory.MakeCircuitRace(length, route, prizePool, specialRaceParameter);
                break;
            }

            return(resultRace);
        }