sikeveo
back after sem2
.
Last edited:
If you use an array then Player1Score and Player2Score could become PlayerScore(Server) where Server is either 0 or 1. Now you can toss the coin and if Head then Server=0 else Server=1.Originally posted by SamD
2. What does Coin Toss mean, presumably determines who serves. You need to detail this somehow.
The question asks to "describe how to score a ball game", so its unecessary to have this repeat loop at all. Furthermore I can't see how your IF statement within this loop works. Just trash the whole loop and replace with Play Rally.3. What does Play game mean when it's within a loop. Seems to me this inside Repeat is unnecessary, you could have just said Play Point or similar.
If you use an array as above then after each rally your IF becomes: IF Server wins rally THEN add 1 to PlayerScore(Server) ELSE Swap Server.4. Your technique for adding points to the server's score is a mess. How is the value in ServerScore shoved back into the relevant Playerscore? I'd suggest using an array with two elements, one for each player.
If using an array then swapping server really means changing the value of the variable Server from 0 to 1 (or viceversa). Could just be Server=(Server+1) MOD 2.5. More detail needed to explain Switch Player Status, no idea how this is done at present. If you use an array then you just change 0 to 1 or 1 to 0 to do this.
you should not have deleted your original post.Originally posted by sikeveo
hey thanks guyz