public MainForm() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; _computerIntelligence = new MinMaxAI(); _music = new GameSounds(); _game = new Game(_computerIntelligence); SubscribeEvents(); _game.CreateNewGame(); }
public MainForm() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; _computerIntelligence = new MinMaxAI(); _music = new GameSounds(); _game = new Game(_computerIntelligence); _game.InitDrawHandler += InitializeDraw; _game.UpdateScoreHandler += UpdateScoreAndPlayerMove; _game.ShomMessageHandler += ShowMessage; _game.PlayGoodSoundHandler += _music.PlayGoodSound; _game.PlayBadSoundHandler += _music.PlayBadSound; _game.CreateNewGame(); }
private void btn_newGameComputer_Click(object sender, EventArgs e) { pnl_Field.Enabled = true; _game.CreateNewGame(); _game.EnableComputerMode(true); }