jfdoyle3/blackjack

GitHub – jfdoyle3/<a title class="aalmanual" target="_blank" href="https://v.bestslots4u.com/f56321a4-e4f2-4ac5-8ed8-78f515421860" rel="noopener">blackjack</a>

<meta name="analytics-location" content="//” data-pjax-transient=”true”>

<!– To prevent page flashing, the optimizely JS needs to be loaded in the
tag before the DOM renders –>

{{ message }}

GitHub is where the world builds software

Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.

Files

Permalink

Failed to load latest commit information.

Type

Name

Latest commit message

Commit time

Create the game of Blackjack in Java.

Plan how to approach a way to create and code this game.

1. How the Game is played:

  • create a card

    ​ Aces can be 1 or 11, royal cards are worth 10

  • build a deck – shuffle deck

  • player places bet

  • deal card

  • player can hit or stand

  • player continues to play until stands or going over 21 and busts

    ​ (black jack = ace and jack wins!!)

  • dealer stands on 17 or better, hits on lower than 17 plays until stands or going over 21 and busts

    ​ (black jack wins!!)

  • winner with highest value wins.

  • Push : Dealer ties with Player.

  • issue chips betx2 if players wins.

  • Player loses bet if dealer wins.

  • Push: player gets bet returned.

2. Game Objects and Methods to consider using:

  • Card
    • card (value, suit): card’s face value and which suit it’s in.

    • .getValue : Get the face value of the card. If a royal card in play change value to 10

  • Deck
  • Create Deck using objCards to make 52 unique cards in Deck OR

    ​ Ceate a new cards when needed keeping track for no duplicates, simulate a 52 a deck of cards.

  • .shuffle : shuffle deck

  • .dealCards : deals card to players

  • black jack Hand
  • .findAce : find if there’s an Ace in play. Change Ace’s value to 1 or 11 to get 21 or best possible hand on the first draw
  • change royal value
  • Player
    • Create Player(playerName, chips) : Player Name, Starting chips
    • .bet : deduct initial bet from chips. optional: (simple validation: can’t under or over bet chips than current balance)
    • .setChips : private method: set the amount of chips based on: bet, winning, pushing.
    • .getChips: get the amount of chips player currently has.
  • Dealer/House – optional.
    • Dealer : has a hand

    • Deals Cards : Deal cards to players

    • .addUpCards : adds total of value for the Cards

    • .hit : request another Card

    • .stand : Stops playing at handTotal

  • StartGame
    • playGame : starts game
  • GameRound / virtTable
    • .round : Player through a round of blackjack
    • .endRound : decide outcome.

About

No description, website, or topics provided.

Resources

No releases published

No packages published


You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.

Latest posts