private void GameVsMachine_Load(object sender, EventArgs e) { computer_name_label.Text = $"Computer (lvl {this.computer_level}.)"; if (user_color == PlayerColor.White) { user_stone_picturebox.Image = StoneStyleImage.FromIDAndColor(Properties.Settings.Default.board_white_stone_image_ID, PlayerColor.White); computer_stone_picturebox.Image = StoneStyleImage.FromIDAndColor(Properties.Settings.Default.board_black_stone_image_ID, PlayerColor.Black); } else { computer_stone_picturebox.Image = StoneStyleImage.FromIDAndColor(Properties.Settings.Default.board_white_stone_image_ID, PlayerColor.White); user_stone_picturebox.Image = StoneStyleImage.FromIDAndColor(Properties.Settings.Default.board_black_stone_image_ID, PlayerColor.Black); } this.board = new Chessboard(ref board_panel); board.Load(); board.PositionateStart(); switch (this.computer_level) { case 0: this.algorithm = new Machine_LVL_0_Algorithm(this); break; case 1: this.algorithm = new Machine_LVL_1_Algorithm(this); break; case 2: this.algorithm = new Machine_LVL_2_Algorithm(this); break; case 3: this.algorithm = new Machine_LVL_3_Algorithm(this); break; default: this.algorithm = new Machine_LVL_3_Algorithm(this); break; } algorithm.Apply(); }
public Clicker(int x, int y, MachineAlgorithm machine_algorithm) : this(new Point(x, y), machine_algorithm) { }
public Clicker(Point square_coordinates, MachineAlgorithm machine_algorithm) { this.machine_algorithm = machine_algorithm; this.square_coordinates = square_coordinates; }