# Poker

## Summary

Go Fish! was cool, but it's time to build some more complicated card games!

## Requirements

1. Create a repository called `poker`.
2. Mark your repository as private, and add me as a collaborator (`ryanjwilson`).
3. Add, commit, and push your code to your `poker` repository.
4. Create a short video (between 3 and 5 minutes) demonstrating your game.

## Rules

We're going to be playing a variation of poker video poker. If you've never played before, it might be worthwhile to watch a video or two on the rules and objectives of the game.

### Ranks

Playing cards have two primary attributes: ranks and suits. A rank is the numeric or face value of a card.

* `Two`
* `Three`
* `Four`
* `Five`
* `Six`
* `Seven`
* `Eight`
* `Nine`
* `Ten`
* `Jack`
* `Queen`
* `King`
* `Ace`

That's 13 possible ranks.

### Suits

Each playing card is also assigned one of four suits.

* `Clubs`
* `Diamonds`
* `Hearts`
* `Spades`

If you're keeping track, that gives us 52 possible cards (i.e., 13 x 4).

### Objective

The objective of the game is to attain the best possible hand. We'll go over all of the possible hands and how they stack up against each other later.

### Wagers

Players must buy-in for certain number of chips. There is no dollar amount associated with a chip, and there's no limit (aside from memory constraints) to how many chips a player can buy-in for or possess.

At the beginning of each hand, a player must decide how many chips they'd like to wager. Player's must wager at least 1 chip, but no more than 25 chips.

### Gameplay

There is only a single, human player. That player is dealt 5 cards. Players are allowed to trade up to 3 cards to try to build their best possible hand.

Here's an example of what this gameplay might look like.

1. The player wagers 5 chips.
2. The player is dealt five cards: 3D, 3H, 7H, JC, KD.
3. The player elects to trade three cards: 7H, JC, KD.
4. The player is dealt three new cards: 3S, 9D, QH
5. The player's final hand is: 3D, 3H, 3S, 9D, QH
6. The player has three-of-a-kind, and is paid out accordingly.

### Hands

There are many possible hands in poker that depend on the ranks and suits of your cards.

* A royal flush is when a player has Ten, Jack, Queen, King, Ace of the same suit.
* A straight flush is when a player has five consecutive cards of the same suit.
* Four-of-a-kind is when a player has all four cards of the same rank.
* A full house is when a player has three of one rank and two of another.
* A flush is when a player has five cards of the same suit.
* A straight is when a player has five consecutive cards regardless of suit.
* Three-of-a-kind is when a player has three cards of the same rank.
* A two pair is when a player has two cards of one rank and two cards of another.
* A pair is when a player has two cards of the same rank.

### Payouts

If a player has at least a pair of Jacks or better, they'll be paid out on the following scale.

* A royal flush is paid at 100x the player's wager.
* A straight flush is paid at 50x the player's wager.
* Four-of-a-kind is paid at 25x the player's wager.
* A full house is paid at 15x the player's
* A flush is paid at 10x the player's wager.
* A straight is paid at 5x the player's wager.
* Three-of-kind is paid at 3x the player's wager.
* A two pair is paid at 2x the player's wager.
* Pair of Jacks or better is paid at 1x the player's wager.

Higher cards are always better, meaning a pair of Aces is better than a pair of Kings, and so on. If a player has a pair of Jacks, they get paid out. However, a pair of Tens or below is considered a losing hand.

## Deliverables

1. Submit your repository URL.
2. Submit a video demo of your game (between 3 and 5 minutes).

Your video demo must show the entirety of gameplay (at least 5 consecutive hands), including wagering, trading, and winning or losing.

## Deadline

All submissions are due on Canvas by 11:59pm on Sunday, January 10, 2021.
