View Single Post
  #2 (permalink)  
Old 12-02-2007, 02:32 AM
Leprechaun Leprechaun is offline
Member
 
Join Date: Dec 2007
Posts: 30
Leprechaun is on a distinguished road
In your problem of a method only returning one value, I would suggest using an array. This way you could have as many values you needed stored in that one array.

I'm not sure about your second question.

0-15-30-40-50 (That's how I remember tennis scoring going)...
I would make a variable, say addTotal, which initially equals 15. Then a condition directly after the line of code where you increment the score like so:
Code:
if (totalScore == 15) addTotal -= 5; //which makes it 10
Then, when you start a new game reset the addTotal to 15.

Hope some of that helped...

Last edited by Leprechaun : 12-02-2007 at 02:34 AM. Reason: Changin tag type
Reply With Quote