protected AbstractInputHandler(IAutoBot bot, IKeyboardHandler keyboard, IMouseHandler mouse, ICollection <IDevice> devices) :
     base(bot)
 {
     this.Keyboard = keyboard;
     this.Mouse    = mouse;
     this.Devices  = devices;
 }
        public TicTacToeLearningModule(IAutoBot bot) :
            base(bot)
        {
            this.States = new HashSet <IState>();

            this.States.Add(new WaitingState(this));
            this.States.Add(new MakingMoveState(this));

            this.CurrentState = this.States.ElementAt(0);
        }
Beispiel #3
0
        /// <summary>
        /// Connects specified <see cref="IAutoBot"/> to <see cref="Process"/> using window title.
        /// </summary>
        public static Tuple <IntPtr, Process> ConnectAutoBotToProcess(IAutoBot autoBot, string windowTitle)
        {
            IntPtr  windowHandler = GetWindowByTitle(windowTitle);
            Process windowProcess = GetProcessByWindowHandler(windowHandler);

            if ((autoBot != null) && (autoBot.ConnectionHandler != null))
            {
                autoBot.ConnectionHandler.AttachToProcess(windowProcess, windowHandler);
            }

            return(new Tuple <IntPtr, Process>(windowHandler, windowProcess));
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            IAutoBotBuilder builder = TicTacToeAutoBotBuilder.NewBuilder();
            IAutoBot        autoBot = builder.NewBot(null);

            autoBot.OnPreStart += (sender, eventArgs) =>
            {
                Console.WriteLine("AutoBot starting...");
            };
            autoBot.OnPreRestart += (sender, eventArgs) =>
            {
                Console.WriteLine($"Playing as: { autoBot[TttSettings.TTT_CHAR] }");
            };
            autoBot.StartBot();
        }
Beispiel #5
0
 public virtual bool Equals(IAutoBot other)
 {
     return(this.Id.Equals(other.Id));
 }
 public WindowsConnectionHandler(IAutoBot bot, ICollection <IConnectedProcess> connectedProcesses) :
     base(bot, connectedProcesses)
 {
     this.PlatformConnectionTools = new WindowsPlatformConnectionTools(this);
 }
 public WindowsConnectionHandler(IAutoBot bot) :
     this(bot, new HashSet <IConnectedProcess>())
 {
 }
Beispiel #8
0
 protected AbstractDataStorage(IAutoBot bot) :
     base(bot)
 {
 }
 protected AbstractConnectionHandler(IAutoBot bot, ICollection <IConnectedProcess> connectedProcesses) :
     base(bot)
 {
     this.ConnectedProcesses = connectedProcesses;
 }
 public WindowsInputHandler(IAutoBot bot, IKeyboardHandler keyboard, IMouseHandler mouse, ICollection <IDevice> devices) :
     base(bot, keyboard, mouse, devices)
 {
 }
 protected AbstractLearningModule(IAutoBot bot) :
     base(bot)
 {
 }
Beispiel #12
0
 protected AbstractFileStorage(IAutoBot bot, DirectoryInfo dirInfo) :
     base(bot)
 {
     this.Directory = dirInfo;
 }
Beispiel #13
0
 protected AbstractModule(IAutoBot bot)
 {
     this.Bot = bot;
 }
 protected AbstractNeuralNetworkLearningModule(IAutoBot bot, INeuralNetwork <TNeuronDataType> neuralNetwork) :
     base(bot)
 {
     this.NeuralNetwork = neuralNetwork;
 }