Page 1 of 1

PHP Blackjack Simulator

Posted: Tue Dec 10, 2013 5:43 am
by Stevyn
http://www.phpclasses.org/package/8376.html

This class can simulate a Blackjack game with one player.

It can start a game adding cards for the player and the bank.

The player can either add more cards until it reaches the score 21 or stand so the bank plays adding its cards and end the game.

The class can return the final results when the game ends.

The cards added by the bank and the player are stored in class variables, so it is possible to get the list of cards to display to the player user.