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

less than 1 minute read

Previous article

Part 1Part2Part3

N players join

Who controls how many people participate in the game?? the dealer? ? For the time being, let’s create a class called Game Master and let it work.

Who determines the outcome?

Will the dealer decide? Is it the game master you made earlier? ? For the time being, the game master, who is the facilitator of the game, will decide whether to win or lose.

What is the outcome when you play the same role?

In the case of one pair vs one pair, the one with the larger card number wins, and if the card has the same number, the strength of the suit is compared. I thought about it, but it’s difficult, so let’s do it next time. For the time being, if there is more than one strongest part, draw it, and if there is only one strongest part, let that person be the winner.


The gamemaster.initialize (the number of players) in which the player inputs the number of participants in the game Gamemaster.judge to determine win/loss between players # code https://github.com/paraizo2424/poker_game/commit/b1becfe81a7b827302d0116562c8e57240e7b403 # next time Part 5 (currently under construction)