Esempio n. 1
0
        protected internal TSensorData Configurate(string ip, int port, Guid cvarcTag,
                                                   HommLevel level          = HommLevel.Level1,
                                                   bool isOnLeftSide        = true,
                                                   int timeLimit            = 90,
                                                   int operationalTimeLimit = 1000,
                                                   int seed             = 0,
                                                   bool speedUp         = false,
                                                   bool debugMap        = false,
                                                   bool spectacularView = true)
        {
            var configs = new GameSettings
            {
                LoadingData = new LoadingData
                {
                    AssemblyName = AssemblyName,
                    Level        = level.ToString()
                },

                SpectacularView      = spectacularView,
                SpeedUp              = speedUp,
                TimeLimit            = timeLimit,
                OperationalTimeLimit = operationalTimeLimit,

                ActorSettings = new List <ActorSettings>
                {
                    new ActorSettings
                    {
                        ControllerId   = isOnLeftSide ? TwoPlayersId.Left : TwoPlayersId.Right,
                        IsBot          = false,
                        PlayerSettings = new PlayerSettings
                        {
                            CvarcTag = cvarcTag
                        }
                    },

                    new ActorSettings
                    {
                        ControllerId = isOnLeftSide ? TwoPlayersId.Right : TwoPlayersId.Left,
                        IsBot        = true,
                        BotName      = HommRules.StandingBotName
                    }
                }
            };

            return(Configurate(port, configs, new HommWorldState(seed, debugMap), ip));
        }
Esempio n. 2
0
        public new HommSensorData Configurate(string ip, int port, Guid cvarcTag,
                                              HommLevel level          = HommLevel.Level1,
                                              bool isOnLeftSide        = true,
                                              int timeLimit            = 90,
                                              int operationalTimeLimit = 1000,
                                              int seed             = 0,
                                              bool speedUp         = false,
                                              bool debugMap        = false,
                                              bool spectacularView = true)
        {
            if (level == HommLevel.Final)
            {
                throw new ArgumentException("Should use HommFinalLevelClient to launch final level.");
            }

            return(base.Configurate(ip, port, cvarcTag, level, isOnLeftSide, timeLimit,
                                    operationalTimeLimit, seed, speedUp, debugMap, spectacularView));
        }
Esempio n. 3
0
 private static Competitions Competitions(HommLevel level, HommLogicPartHelper logicPartHelper)
 {
     return(new Competitions("homm", level.ToString(), logicPartHelper, () => new UKeyboard(), CreateEngines));
 }