canasta v0.1.0 Canasta.Game View Source
Represents the game in its whole. This is mainly what the API will interact with.
Link to this section Summary
Functions
:player_one — player one :player_two — player two :pile — the cards the players can draft from :player_turn — whose turn it is to play :table — what cards are put down on the table :pulled — whether or not the current player (player_turn) has pulled a card
Creates a new game and starts it — this means dealing cards (including handling red threes), and putting a card on the table
Give a card to the player whos turn it is and alter the current player. Doesn’t allow players to draft two cards
Give a card to player. Don’t touch, fragile code. Also checks for red three and fixes that
Handles eventual red threes on hand
Draft a card; gives a card to the player whose turn it is and prevents them from drafting another card
Put the first card on the table, can not be a wild card. Will shuffle and try again if card is wild
Starts the game. Puts a card on the table, and gives a card to the starting player
Link to this section Functions
:player_one — player one :player_two — player two :pile — the cards the players can draft from :player_turn — whose turn it is to play :table — what cards are put down on the table :pulled — whether or not the current player (player_turn) has pulled a card
Creates a new game and starts it — this means dealing cards (including handling red threes), and putting a card on the table.
Give a card to the player whos turn it is and alter the current player. Doesn’t allow players to draft two cards.
Give a card to player. Don’t touch, fragile code. Also checks for red three and fixes that.
Handles eventual red threes on hand.
Draft a card; gives a card to the player whose turn it is and prevents them from drafting another card.
Put the first card on the table, can not be a wild card. Will shuffle and try again if card is wild.
Starts the game. Puts a card on the table, and gives a card to the starting player.