Game Loop Logic for UNO
play_turns_loop.Rd
Handles the main logic of the UNO game by processing each player's turn. This includes checking playable cards, handling drawing from the deck, applying special actions (skip, reverse, +2, wild), and checking for a winner.
Value
A list containing:
- winner
Name of the winning player (e.g. "Player_3") or NULL if the game ends in a draw
- hands
A named list of each player's final hand
- discard
A tibble showing the final discard pile, including the full play history. Note: For wild and wild_draw4 cards, the
color
column reflects the color the player chose when playing the card (e.g."green wild"
means the player played a wild card and chose green).
Details
This function is not typically called directly by the user. Instead, use
play_game
to run a full game.