[Refactor] Separate Round logic into its own file (#570)
* Everything works, need to clean up * cleanup * fix rebase issue * clang format * docs * clang format * clang format * address part of review * Protect against edge case when discarding at end of hand * Protect undiscard against popping a discarded card that doesn't exist * Protect against out of bounds access to the `played` cards stack * fix condition in `select_four_of_a_kind_cards_in_played_hand` * change `get_played_top() + 1` to `get_played_size()` * move `can_play/discard_hand` functions to round.c --------- Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@ DEF_STATE_INFO(GAME_STATE_MAIN_MENU, game_main_menu_on_init, game_main_me
|
||||
DEF_STATE_INFO(GAME_STATE_OPTIONS_MENU, game_options_menu_on_init, game_options_menu_on_update, game_options_menu_on_exit)
|
||||
DEF_STATE_INFO(GAME_STATE_RUN_SETUP , game_run_setup_on_init, game_run_setup_on_update, game_run_setup_on_exit )
|
||||
DEF_STATE_INFO(GAME_STATE_GAME_START, noop, game_start, noop )
|
||||
DEF_STATE_INFO(GAME_STATE_PLAYING, game_round_on_init, game_playing_on_update, noop )
|
||||
DEF_STATE_INFO(GAME_STATE_ROUND, game_round_on_init, game_round_on_update, noop )
|
||||
DEF_STATE_INFO(GAME_STATE_ROUND_END, game_round_end_on_init, game_round_end_on_update, game_round_end_on_exit )
|
||||
DEF_STATE_INFO(GAME_STATE_SHOP, game_shop_on_init, game_shop_on_update, game_shop_on_exit )
|
||||
DEF_STATE_INFO(GAME_STATE_BLIND_SELECT, game_blind_select_on_init, game_blind_select_on_update, game_blind_select_on_exit)
|
||||
|
||||
Reference in New Issue
Block a user