summaryrefslogtreecommitdiff
path: root/server/hand.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/hand.h')
-rw-r--r--server/hand.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/server/hand.h b/server/hand.h
index e38a387..879bc8d 100644
--- a/server/hand.h
+++ b/server/hand.h
@@ -16,20 +16,20 @@ namespace Hand {
// Check if the tiles is matching the normal format but missing one.
bool basic_format_tenpai(const Tiles& tiles, bool pair_eaten = false, bool wait_eaten = false);
- // Eat a single tile (i.e. the tanki machi) from beginning of list and return rest.
- Tiles eat_tanki(Tiles tiles);
+ // Eat a single tile (i.e. the tanki machi) from beginning of list and return success flag.
+ bool eat_tanki(Tiles& tiles);
- // Eat two tiles waiting for a third to complete a chi (i.e. ryanmen, penchan or kanchan machi) if possible.
- Tiles eat_chi_wait(Tiles tiles);
+ // Eat two tiles waiting for a third to complete a chi (i.e. ryanmen, penchan or kanchan machi) if possible and return success flag.
+ bool eat_chi_wait(Tiles& tiles);
- // Eat a pair from beginning of list if possible and return rest, else return empty list.
- Tiles eat_pair(Tiles tiles);
+ // Eat a pair from beginning of list if possible and return success flag.
+ bool eat_pair(Tiles& tiles);
- // Eat a pon from beginning of list if possible and return rest, else return empty list.
- Tiles eat_pon(Tiles tiles);
+ // Eat a pon from beginning of list if possible and return success flag.
+ bool eat_pon(Tiles& tiles);
- // Eat a chi from beginning of list if possible and return rest, else return empty list.
- Tiles eat_chi(Tiles tiles);
+ // Eat a chi from beginning of list if possible and return success flag.
+ bool eat_chi(Tiles& tiles);
}
#endif