public void MakeMove(int i, int j, GameModel.State side) { model.MakeMove(i, j, side); if (model.GameOver) { MessageBox.Show("Game Over, winner is " + symbols[model.Winner] + "\n" + "Count of X's winners: " + GameModel.countXWin + "\n" + "Count of O's winners: " + GameModel.countOWin + "\n" + "Count of draws: " + GameModel.draw); DialogResult result = MessageBox.Show("Would you like to play again?", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); if (result == DialogResult.Yes) { model = new GameModel(); model.UpdateView += UpdateView; UpdateView(model); } else { this.Close(); } } }
// Use this for initialization void Start() { theGM = FindObjectOfType <GameModel>(); buttonState = (GameModel.State)(instructionID); }
public void MakeMove(int i, int j, GameModel.State side) { model.MakeMove(i, j, side); }