private void Form1_MouseUp(object sender, MouseEventArgs e) { Invalidate(); int res = game.VerifyWinner(); if (res == MainGame.NOT_READY) return; string result = "Победитель: "; result += res == MainGame.X ? "Крестики" : res == MainGame.O ? "Нолики" : "Ничья"; MessageBox.Show(result, "Типа Ура", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); game = new MainGame(ClientSize.Height, ClientSize.Width); Invalidate(); }
public Form1() { InitializeComponent(); game = new MainGame(ClientSize.Height, ClientSize.Width); Invalidate(); }