コード例 #1
0
 protected AbstractInputHandler(IAutoBot bot, IKeyboardHandler keyboard, IMouseHandler mouse, ICollection <IDevice> devices) :
     base(bot)
 {
     this.Keyboard = keyboard;
     this.Mouse    = mouse;
     this.Devices  = devices;
 }
コード例 #2
0
        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);
        }
コード例 #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));
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: Sejoslaw/KD.AutoBot
        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();
        }
コード例 #5
0
 public virtual bool Equals(IAutoBot other)
 {
     return(this.Id.Equals(other.Id));
 }
コード例 #6
0
 public WindowsConnectionHandler(IAutoBot bot, ICollection <IConnectedProcess> connectedProcesses) :
     base(bot, connectedProcesses)
 {
     this.PlatformConnectionTools = new WindowsPlatformConnectionTools(this);
 }
コード例 #7
0
 public WindowsConnectionHandler(IAutoBot bot) :
     this(bot, new HashSet <IConnectedProcess>())
 {
 }
コード例 #8
0
 protected AbstractDataStorage(IAutoBot bot) :
     base(bot)
 {
 }
コード例 #9
0
 protected AbstractConnectionHandler(IAutoBot bot, ICollection <IConnectedProcess> connectedProcesses) :
     base(bot)
 {
     this.ConnectedProcesses = connectedProcesses;
 }
コード例 #10
0
 public WindowsInputHandler(IAutoBot bot, IKeyboardHandler keyboard, IMouseHandler mouse, ICollection <IDevice> devices) :
     base(bot, keyboard, mouse, devices)
 {
 }
コード例 #11
0
 protected AbstractLearningModule(IAutoBot bot) :
     base(bot)
 {
 }
コード例 #12
0
 protected AbstractFileStorage(IAutoBot bot, DirectoryInfo dirInfo) :
     base(bot)
 {
     this.Directory = dirInfo;
 }
コード例 #13
0
 protected AbstractModule(IAutoBot bot)
 {
     this.Bot = bot;
 }
コード例 #14
0
 protected AbstractNeuralNetworkLearningModule(IAutoBot bot, INeuralNetwork <TNeuronDataType> neuralNetwork) :
     base(bot)
 {
     this.NeuralNetwork = neuralNetwork;
 }