Esempio n. 1
0
        public Robot(RobotData data)
        {
            Data = data;

            Stats = new Dictionary <RobotStat, int>();
            foreach (RobotStat stat in Enum.GetValues(typeof(RobotStat)))
            {
                SetMaxStat(stat);
            }
        }
Esempio n. 2
0
        public Match Create(IEnumerable <string> participantIds)
        {
            List <Robot> participants = new List <Robot>();

            foreach (string participantId in participantIds)
            {
                RobotData data = DataManager.GetRobotData(participantId);
                participants.Add(new Robot(data));
            }

            World world = WorldGenerator.Generate();

            world.Initialize(participants);

            return(new Match
            {
                World = world,
                Participants = participants
            });
        }