tuvokki / pleague

A league system for the company fußball
0 stars 3 forks source link

Update game scoring #38

Open tuvokki opened 8 years ago

tuvokki commented 8 years ago

With code like

if (inprogress.teamRedScore++ > 5) {              // red won

the logic behind scoring and winning a game in progress is not up to par. Revision is needed.

tuvokki commented 8 years ago

Current domain model: image

tuvokki commented 8 years ago

the player-model should facilitate #2 and #40 (as well as other perhaps)

iishtar commented 8 years ago

Domain model looks fine to me.

  1. For #2 Player goal count can be done by mapReduce, map games to playerid,goals en then sum the goals.
  2. Elo history #40 is redudant data for creating graphs, you can always recalculated the history with the games.
  3. a goal object would be nice (stored as a list of goals in Game), so we can see when you scored, crawl data, and later add flags for own-goal, '5'-goal, etc.