Updating the Score

Updating the score is an easy chore, but because it’s done from several places, it is a good candidate for a method call:

private void updateScore(){
  1b1P1Score.Text = "Player: " + playerScore.ToString();
  1b1OppScore.Text = "  Opp: " + oppScore.ToString();
} // end updateScore

To update the score, all I had to do was convert the playerScore and oppScore values to strings and copy them to the appropriate labels.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.189.199