© Bob Dukish 2018
Bob DukishCoding the Arduinohttps://doi.org/10.1007/978-1-4842-3510-2_9

9. More Elaborate Projects

Bob Dukish1 
(1)
Canfield, Ohio, USA
 

Coding a More Functional Poker Game

In Chapter 6 we experimented with coding the game of poker and were able to put together a very simplistic version of the game. The advanced program in this chapter builds on the earlier code for generating nonduplicate numbers to represent the cards in a playing deck. It deals five random cards to the player and five to the dealer (refer to Table 6-1 for card value translations). The code in Listing 9-1 goes on to identify both hands by using the rules of poker. At first glance, it looks like a tremendous amount of code, but because the player and dealer sections ...

Get Coding the Arduino: Building Fun Programs, Games, and Electronic Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.