private void BtnRoll_Click(object sender, EventArgs e) { BtnRoll.Visible = false; // hides the roll button to stop mutipole button clicks BtnRoll.Refresh(); // refreshes the button RollDice(HowManyDiceRolled()); if (sCurrentSession.ActiveAi && sCurrentSession.gCurrentGame.PlayerTurn == 1) //checks if its one player and has the AI go if the Ai is active { AIturn(); } }
// Methord to refresh elements after they have been updated private void refresh() { btnExit.Refresh(); BtnRoll.Refresh(); LblTurnOutcome.Refresh(); LblScorePlayerOne.Refresh(); LblScorePlayerTwo.Refresh(); lblPlayerTurn.Refresh(); tbxNewScore.Refresh(); }