Tennis Scoring???
mcguansa24
Member Posts: 2
I am making a game and I would like to have tennis scoring. (Love, 15, 30, 40, Game) I am planning on doing a 2 out of 3 game thing. Does anyone have any idea how to go about coding that??
Comments
Each point gained increases the player's score by one.
E.g.
if player1score = 0 change attribute TennisScore1 to 'love'
if player1score = 1 change attribute TennisScore1 to '15'
if player1score = 2 change attribute TennisScore1 to '30'
if player1score = 3 change attribute TennisScore1 to '40'
if player1score = 4 change attribute TennisScore1 to 'Game'
You would display the attribute TennisScore1 only, not player1score
TennisScore1 should be a text variable
You would do the same as above for player 2 - keep his score in the attribute player2score, and his tennisScore in TennisScore2
To work out the 'deuce' and 'advantage' rules, you'd do something like:
If player1score = 3
AND
if player2score = 3
TennisScore1 = deuce
TennisScore2 = deuce
I'll let you figure out the rest yourself
Hope that helps!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io