diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-25 12:54:59 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-25 12:54:59 +0100 |
commit | fae209a9e93400c3a2072befda9c820634cf9278 (patch) | |
tree | 2d69e2c75fff0e08468c168f773abbc939a2ff03 /src/score.h | |
parent | 94a1189d757f0269ac081ad2d750152e30564986 (diff) |
Diffstat (limited to 'src/score.h')
-rw-r--r-- | src/score.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/score.h b/src/score.h new file mode 100644 index 0000000..6dee09a --- /dev/null +++ b/src/score.h @@ -0,0 +1,40 @@ +#ifndef SCORE_H +#define SCORE_H + +class Score { + public: + //! Points (doubles). + int yaku; + + //! Minipoints. + int fu; + + //! Bonus points. + int dora; + + //! Constructor. + Score(int yaku_ = 0, int fu_ = 0, int dora_ = 0); + + //! Calculate han. (yaku + dora) + int han(); + + //! Calculate fu rounded up to closest 10. + int fu_rounded(); + + //! Calculate base points. + int base_points(); + + //! Score paid upon ron. (4 BP) + int ron(); + + //! Score paid upon ron by east. (6 BP) + int ron_east(); + + //! Score paid by others upon tsumo by others. (BP) + int tsumo(); + + //! Score paid by east upon tsumo by others or others upon tsumo by east. (2 BP) + int tsumo_east(); +}; + +#endif |