scoring.hrl 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. -ifndef(SCORING_HRL).
  2. -define(SCORING_HRL, "scoring_hrl").
  3. -include_lib("kvs/include/kvs.hrl").
  4. -record(player_scoring, {
  5. ?ITERATOR(feed),
  6. temp,
  7. permanent, %% top of Permanent Scoring record linked list
  8. %%-- aggregated score for all game types is is a list
  9. %% [{game_okey, 15},{game_tavla, 12},...]
  10. agregated_score
  11. }).
  12. -record(scoring_record, {
  13. ?ITERATOR(feed),
  14. game_id, %% game id for rematching and lost connections
  15. who, %% player
  16. all_players, %% with other players
  17. game_type, %% okey, tavla, batak
  18. game_kind, %% chanak, standard, even-odd
  19. condition, %% reveal with even tashes, color okey reveal, show gosterge, batak 3 aces, tavla mars.
  20. score_points, %% result score points for player
  21. score_kakaush, %% result score kakuş for player
  22. custom, %% erlang record for a specific game
  23. timestamp %% now() of the record
  24. }).
  25. %% total count of everything
  26. -record(personal_score, {
  27. ?ITERATOR(feed),
  28. uid,
  29. games = 0,
  30. wins = 0,
  31. loses = 0,
  32. disconnects = 0,
  33. points = 0,
  34. average_time = 0
  35. }).
  36. -endif.