I did my best to break down my simplified BlackJack project into do-able, separate milestones. The milestones still need some clarification, but this is a good starting point.
06.05.2018- BlackJack App- Milestones
- Create a ‘deck of cards’: i.e. Generate a random number 1-10
- Deal ‘two cards’: Randomly generate to the user and dealer each, one hidden one shown
- Compute sum for user and dealer, store… Dealer sum must be between 16-21
- Ask the user whether they want to “HIT” or “STAY”
- If user returns “HIT”, add another randomly generated number to the user
USER: *randomly generate two numbers *randomly generate a number between 16 and 21 *compute sum, store and show *ask user whether they want to “HIT” or “STAY” - *if user choses “HIT”, add another random number, update the total, and check if total > 21 *if > 21, automatically lose *if <= 21, continue to ask user whether to “HIT” or “STAY” until user inputs “STAY” DEALER: *randomly generate a number between 16 and 21
- return User’s sum - return Dealer’s ‘sum’
COMPARE:
- compare User’s sum separately, is it <21? if not = BUST, User looses
- compare User’s sum and Dealer’s sum: …
I need to put in more work on breaking down the comparison between the User’s sum and the Dealer’s number. Putting it on the to-do list!