Kevin's milestone of the Blackjack app

by kevin-kao

06 Jun 2018

I chose BlackJack app for my development project because I would like to try something new based on what I’ve learned so far. Here is my milestone for basic requirements that I will refer to in my program:

  • Assign an random number between 16 – 21 to the dealer.
  • Ask the player to enter his or her name to start the game. input
  • Assign two random numbers to the player; one is hidden and the other is known.
  • Reveal the number of the latter one to the player.
  • Ask the player to choose either “HIT” or “STAY”. input
  • If the player chooses “HIT”, assign a new card to the player (use the loop, the loop ends when the player choose “STAY” for the next time)
  • If the player chooses “STAY”, go with if function: if the player’s total number is greater than 21, the player loses the game. On the other hand, if the player’s total number is equal or less than 21, then see who is closer to 21 and decide who the winner is.
  • Reveal the results of game.
I am a visiting student here in UNC and an incoming student at Duke University studying quantitative management for my master degree this fall. Find kevin-kao on Twitter, Github, and on the web.