issues
search
UninspiredCarrot
/
who-won
0
stars
0
forks
source link
Build Game Logic
#1
Closed
UninspiredCarrot
closed
17 hours ago
UninspiredCarrot
commented
2 days ago
Building Game Logic
Requirements
[x] Register Players
[x] Start a match with said players
[ ] Decide who is serving
[ ] Increase score of player
[ ] End of Set logic
[ ] Create a new set when needed
[ ] Stop after 3 sets with winner and loser
[ ] Retirement
[ ] Undo
[ ] Doubles serving logic ?
Classes:
Player
Fields:
id
name
Match
Fields:
player1
player2
sets
player-serve
player-side
state: not started | playing | done
winner
loser
Methods:
start match
switch sides
get current set
new set
match done
Set
Fields:
points
state: not started | playing | done
Methods:
get point
increment
undo point
check if done
Point
Fields:
server
winner
path
state: tap | sequence
Methods:
switch server
Shot
Fields:
x
y
Methods:
Building Game Logic
Requirements
Classes:
Player
Match
Set
Point
Shot