Implementing poker little by little in Ruby Part 2

Part 2 flow

To the previous article Part 1

Part 2 start The player selects and discards unnecessary cards. Dealer replenishes only the number discarded End

How to choose a card

A slightly improved player.show to display the numbered cards. The player inputs the cards to be discarded by separating them with a half-width space. Change the card selected from the hands array of the player instance to ~~ Erase ~~ 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 them to the player. End

Part 2 code

https://github.com/paraizo2424/poker_game/tree/a5331caa1a828ff5dc6f3b37ec381900936c5a46

next time

Go to Part 3

Recommended Posts

Implementing poker little by little in Ruby Part 2
Implementing poker little by little in Ruby Part 1
Implementing poker little by little in Ruby Part 4
Implementing poker little by little in Ruby Part 3
Heavy in Ruby! ??
Write a test by implementing the story of Mr. Nabeats in the world with ruby
Output triangle in Ruby
Variable type in ruby
Fast popcount in Ruby