[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:
Geralt
2026-06-27 16:57:37 -07:00
committed by GitHub
co-authored by MathisMartin31
parent f722b9eef4
commit 45eac259a5
12 changed files with 2207 additions and 2015 deletions
+3 -3
View File
@@ -309,8 +309,8 @@ static void game_blind_select_display_blind_panel()
static void game_blind_select_exit(void)
{
reset_background();
game_change_state(GAME_STATE_PLAYING);
change_background(BG_NONE, false);
game_change_state(GAME_STATE_ROUND);
}
static Rect game_blind_select_get_req_score_rect(enum BlindTokens blind)
@@ -484,7 +484,7 @@ void game_blind_select_on_exit(void)
sprite_destroy(&blind_select_tokens[BIG_BLIND]);
sprite_destroy(&blind_select_tokens[BOSS_BLIND]);
reset_background();
change_background(BG_NONE, false);
selection_y = 0;
state_machine_remove(&blind_select_sm);