public UnitTestBotLogic()
 {
     _botLogic  = new BotLogic();
     _gameBoard = new GameBoard();
     _player    = new Player {
         PlayerFirstName = "Bot", PlayerID = 666, PlayerLastName = "Boy", PlayerType = PlayerType.Bot, PlayerToken = 'X'
     };
 }
Beispiel #2
0
 public PlayController(
     IBotLogic botLogic,
     IScriptValidationHelper scriptValidationHelper,
     IConfigurationHelper configurationHelper)
 {
     _botLogic = botLogic;
     _scriptValidationHelper = scriptValidationHelper;
     _configurationHelper    = configurationHelper;
 }
Beispiel #3
0
 public BotProcessingFactory(
     IBotLogic botLogic,
     IBotScriptCompiler botScriptCompiler,
     IBotScriptCache botScriptCache, ILogger <BotProcessingFactory> logger)
 {
     _botLogic          = botLogic;
     _botScriptCompiler = botScriptCompiler;
     _botScriptCache    = botScriptCache;
     _logger            = logger;
 }
Beispiel #4
0
 public PlayController(
     IConfiguration configuration,
     IBotLogic botLogic,
     ITemplateLogic templateLogic,
     IScriptValidationHelper scriptValidationHelper,
     IConfigurationHelper configurationHelper)
 {
     _configuration          = configuration;
     _botLogic               = botLogic;
     _templateLogic          = templateLogic;
     _scriptValidationHelper = scriptValidationHelper;
     _configurationHelper    = configurationHelper;
 }
 public Middleware(
     IArenaLogic arenaLogic,
     IBotLogic botLogic,
     IPreprocessor preprocessor,
     IProcessor processor,
     IPostprocessor postprocessor)
 {
     _arenaLogic    = arenaLogic;
     _botLogic      = botLogic;
     _preprocessor  = preprocessor;
     _processor     = processor;
     _postprocessor = postprocessor;
 }
Beispiel #6
0
 public Middleware(
     IArenaLogic arenaLogic,
     IBotLogic botLogic,
     IMessageLogic messageLogic,
     IPreprocessor preprocessor,
     IProcessor processor,
     IPostprocessor postprocessor,
     ILogger <Middleware> logger)
 {
     _arenaLogic    = arenaLogic;
     _botLogic      = botLogic;
     _messageLogic  = messageLogic;
     _preprocessor  = preprocessor;
     _processor     = processor;
     _postprocessor = postprocessor;
     _logger        = logger;
 }
Beispiel #7
0
            // Bereit zum senden von Kommandos
            private void OnReadyToSendCommands(object sender, EventArgs e)
            {
                // Logging
                Logging.Log("Verbindung erfolgreich. Starte Authentifizierung...");

                // Login
                query = new QueryRunner(tcpSocket);
                query.Login(username, password);
                query.SelectVirtualServerByPort(serverPort);
                query.UpdateCurrentQueryClient(new ClientModification()
                {
                    Nickname = TeamSpeakBot.settings.name
                });

                // Mehr Logging
                Logging.Log("Authentifizierung erfolgreich. Starte Bot-Logik...");

                // Bot Logik
                Type[] types = Assembly.GetAssembly(GetType()).GetTypes().Where(t => t.GetInterface("IBotLogic") != null).ToArray();
                foreach (Type bot in types)
                {
                    Logging.Log("Starte " + bot.Name + "...");
                    try
                    {
                        IBotLogic logic = Activator.CreateInstance(bot) as IBotLogic;
                        fetch.botLogic.Add(logic);
                        Logging.LogSpecial(bot.Name + " gestartet.");
                    }
                    catch (Exception e2)
                    {
                        Logging.LogWarning("Kann " + bot.Name + " nicht starten!");
                        Logging.LogException(e2);
                    }
                }

                // Status
                connected = true;
            }
 public Processor(IBotLogic botLogic)
 {
     _botLogic = botLogic;
 }
 public UserAccessController(ILogger <UserAccessController> logger, IBotLogic _botlogic)
 {
     _logger  = logger;
     botlogic = _botlogic;
 }