Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

week 02 - day 04 - Blackjack #8

Closed
4 of 11 tasks
mdewey opened this issue May 9, 2019 · 5 comments
Closed
4 of 11 tasks

week 02 - day 04 - Blackjack #8

mdewey opened this issue May 9, 2019 · 5 comments
Assignees

Comments

@mdewey
Copy link
Collaborator

mdewey commented May 9, 2019

Blackjack

In this project, you will create a playable game of Blackjack.

Objectives

  • Create an event-driven user interface
  • Effectively use loops, conditionals, and other control structures to implement control flows
  • Demonstrate usage of JavaScript objects and arrays to model resources

Requirements

Create a single player blackjack games that play against the house, i.e. a human player and computer dealer. You are free to create the user interface however you want, but keep it simple for Explorer Mode.

General Rules:

  • The game should be played with a standard deck of playing cards (52).
  • The house should be dealt with two cards, hidden from the player until the house reveals its hand.
  • The player should be dealt a hand that contains two cards, visible to the player.
  • The player should have a chance to hit (i.e. be dealt another card) until they decide to stop or they bust (i.e. their total is over 21 ).
  • When the player stands, the house will reveal its hand and hit (i.e. draw cards) until they have 17 or more.
  • If either the house or the player bust, they lose.

Assets

  • Find a set of card images here
  • Make an images folder in your project
  • Extract that cards.zip file and then copy/move the extracted images into your project's images folder
  • Note that the names of the images are of the form face of suit.svg (without the spaces)

Explorer Mode

  • The player should have two choices: "Hit" and "Stand"
  • Consider Aces to be worth 11, never 1.
  • The page should display the winner. For this mode, the winner is defined as who was closer to a blackjack (21) without going over.
  • There should be an option to play again; this should reset the hands and reshuffle the deck.

Adventure Mode

  • Reveal one of the house's cards to the player when cards are first dealt.
  • Consider aces be worth one or eleven.
  • Allow the player to "Split".
  • Improve the win requirements. From Wikipedia:

    Players win by not busting and having a total higher than the dealer, or not busting and having the dealer bust, or getting a blackjack without the dealer getting a blackjack. If the player and dealer have the same total (not counting blackjacks), this is called a "push", and the player typically does not win or lose money on that hand. Otherwise, the dealer wins.

Epic Mode

  • Add a betting system that carries between rounds
  • Allow the player to "Double down" or "Surrender"
  • Add more Players
@Dantezinfern0
Copy link
Owner

@mdewey
Copy link
Collaborator Author

mdewey commented May 14, 2019

Almost complete. I would like to see:

  • the dealer getting a hand
  • some endgame logic as well.

@mdewey mdewey reopened this May 14, 2019
@mdewey
Copy link
Collaborator Author

mdewey commented May 14, 2019

If you have any questions, come find me

@Dantezinfern0
Copy link
Owner

@mdewey
Copy link
Collaborator Author

mdewey commented May 15, 2019

Your homework was marked: Meets Expectations

Well done!

“Well done!”
— via Gavin Stark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants