Interact with the game by typing commands into the console and pressing enter.
play_poker(colors = c(2, 4, 1))Generates an interactive game of poker in the console.
One of 1, 2, or 4.
The number of colors to use to render the suits.
For 1, all suits are the default console color.
For 2, hearts and diamonds are red and spades and clubs are
the default console color.
For 4, hearts are red, clubs are green, diamonds are blue, and spades
are the default console color.
| Hand | Points | Description |
| Junk | -10 | Nothing of value. |
| Low pair | 0 | Two cards of the same rank, ten or below. |
| High pair | 5 | Two aces, kings, queens, or jacks. |
| Two pair | 10 | Two cards of one rank and two cards of another. |
| Three of a kind | 20 | Three cards of the same rank. |
| Straight | 50 | Five cards in sequential order. |
| Flush | 75 | Five cards of the same suit. |
| Full house | 100 | Three cards of one rank and two cards of another. |
| Four of a kind | 1,000 | Four cards of the same rank. |
| Straight flush | 50,000 | Five cards of the same suit in sequential order. |
| Royal flush | 1,000,000 | Ace, king, queen, jack, and ten of the same suit. |
For straights, aces may be considered the highest card (above king) or the lowest card (below two). However, aces may not be used to connect a king and a two (e.g. Q-K-A-2-3 is not a straight).
play_poker()
play_poker(colors = 4)
play_poker(colors = 1)
Run the code above in your browser using DataLab