コード例 #1
0
        private Race MakeRace(string type, int length, string route, int prizePool)
        {
            Race resultRace = null;

            switch (type)
            {
            case "Casual":
                resultRace = RaceFactory.MakeCasualRace(length, route, prizePool);
                break;

            case "Drag":
                resultRace = RaceFactory.MakeDragRace(length, route, prizePool);
                break;

            case "Drift":
                resultRace = RaceFactory.MakeDriftRace(length, route, prizePool);
                break;
            }

            return(resultRace);
        }