Skip to content

PHP / Object-Oriented Programming - Developed a simplified Blackjack game in PHP using OOP. Players are dealt two cards, and the goal is to get the highest score without exceeding 21.

Notifications You must be signed in to change notification settings

BigDaveCoding/blackjack-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

blackjack-php

BLACKJACK EXERCISE Create a PHP program that runs the simplified blackjack game From a single deck of cards each player is given 2 cards. Cards 2, 3, 4, 5, 6, 7, 8, 9, 10 have 2, 3, 4, 5, 6, 7, 8, 9, 10 points respectively. J, Q, K are all worth 10 points. A is worth 11 points Each player has a score which is the sum of the points for their two cards the winner is the player with the highest points If either player goes over 21, the other player wins. If the scores are equal or both over 21 it should output a draw Important: Do NOT write a fancy HTML&CSS page - only simple text output Keep it as simple as possible! Stretch goals Use any of the below as additional goals:

Output the cards both players picked If either players score is < 14, draw a third card If an ace is picked, and the total score is over 21, the ace becomes worth 1 point If either players score is < 14, draw an additional card and continue to draw until their score is 14 or more

About

PHP / Object-Oriented Programming - Developed a simplified Blackjack game in PHP using OOP. Players are dealt two cards, and the goal is to get the highest score without exceeding 21.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages