As I learned about Ruby little by little, I started thinking that I wanted to create a program that would work. Anyway, I will write with an emphasis on moving. Something strange or should I usually do this? Please comment if you have any advice.
Draw poker When several players sit at the table, the dealer deals five cards, makes one card change, and competes for the victory or defeat of the role.
The dealer comes in, deals the cards, and the player gets five cards.
There are a total of 52 playing cards, 4 types of suits and 13 cards, and JOKER cannot be inserted. Save each card in an associative array {suit: ❤︎, num: 4}.
Game Start Part 1~ The dealer shuffles and prepares the deck. The dealer hands the deck the top five cards to the player. The player receives a card from the dealer. Part 1~ Game over
Dealers, decks (cards of playing cards), players
Dealer prepares deck Dealer.initialize (Deck.new) Dealer shuffles the deck Dealer.shuffle Dealer gives the card to the player Dealer.deal (Player, number of sheets) Player saves the cards received in his hand Player.initialize (hands) Display the player's hand on the screen Player.show
https://github.com/paraizo2424/poker_game/commit/850e102e661605787db6a853447c342e693807d4
Recommended Posts