C. Program Description for Developers

The game that we chose to create was BlackJack

The graphics are first initialized by the first part of the code. The player is assigned a value of 300 dollars which they can bet with. The player is given the option to bet either $25, $75, or $100 and they must choose one of those options. Then the codes randomly assigns two cards to both the player and the dealer. The code then asks the player whether they want to “hit or “stand”. The player then has the option to hit the green button to hit or red button to stand. The player has the option to hit as many times as they choose but once they hit the stand button, their turn is over. The code then give the dealer the same options. The code sums the values of the cards and then uses a conditional statement to determine who has the highest sum. The player with the highest sum is then determined the winner of the round and the round is over and this is where the code comes to an end.

There were many variables that were used to code the game. Below is a list of all of those variables.

playAgain

winner

dealerHits

playerStartAmount

cardDeckNumbers

userBet

totalPot

initialPlayerCards

playerCardSum

dealerCardSum

my_Scene

empty_sprite

empty_sprite_space

card_sprites

hit_sprite

cancel_sprite

stand_sprite

card_display

userStand

drawScene

rows_

column_

buttons_

acePresent

Below is a list of game commands

There is a user input command along with a user click command. The user input command is used to get the players input for betting money. The user click command is used when the player has to click on “hit” or “stand”.