Reader small image

You're reading from  Learn C Programming. - Second Edition

Product typeBook
Published inAug 2022
PublisherPackt
ISBN-139781801078450
Edition2nd Edition
Right arrow
Author (1)
Jeff Szuhay
Jeff Szuhay
author image
Jeff Szuhay

Jeff Szuhay is the principal developer at QuarterTil2 which specializes in graphics-rich software chronographs for desktop environments. In his software career of over 35 years, he has engaged in a full range of development activities from systems analysis and systems performance tuning to application design, from initial development through full testing and final delivery. Throughout that time, he has taught computer applications and programming languages at various educational levels from elementary school students to university students, as well as developed and presented professional, on-site training.
Read more about Jeff Szuhay

Right arrow

Game one – Blackjack

This is the first of two games we will implement using our library of structures and functions from dealer.c. We will have a complete and playable Blackjack card game between the dealer and one player.

Introducing Blackjack

Blackjack is a casino card game played between the dealer and one or more players. It is also known as 21. In our implementation, there will only be the dealer and you, the player. Blackjack uses all 52 cards from 1 to 8 decks. In our implementation, there will be only one deck. The deck is shuffled and each player is given two initial cards, as is the dealer. One of the dealer’s dealt cards is kept hidden until it is the dealer’s turn to play. In our implementation, all cards will be visible.

The face value of each hand is calculated. Each card’s face value is its number. Jack, queen, and king count as 10. Aces count as either 1 or 11. In our implementation, aces will always count as 11.

The...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learn C Programming. - Second Edition
Published in: Aug 2022Publisher: PacktISBN-13: 9781801078450

Author (1)

author image
Jeff Szuhay

Jeff Szuhay is the principal developer at QuarterTil2 which specializes in graphics-rich software chronographs for desktop environments. In his software career of over 35 years, he has engaged in a full range of development activities from systems analysis and systems performance tuning to application design, from initial development through full testing and final delivery. Throughout that time, he has taught computer applications and programming languages at various educational levels from elementary school students to university students, as well as developed and presented professional, on-site training.
Read more about Jeff Szuhay