[Ruby] Implement poker little by little with Ruby Part 2

less than 1 minute read

Part 2 flow

To the previous article Part 1

Part 2 start Players select cards they don’t need and discard them. Dealer-Replenish the number of discarded cards End

How to choose a card

A little modification of player.show to show numbered cards. The player inputs the cards to be discarded with a space. Change the selected card from hands array of player instance to delete~nil. The player asks the dealer to deal the erased number of cards. The dealer takes the requested number of cards from the deck and hands it to the player. End

Part 2 code


next time

Part 3