Skip to content

aysiae/blackjack

 
 

Repository files navigation

Black Jack Discord Bot

Deployment

Heroku Deployment

Team Members

  • Aysia Brown
  • Tina Myers
  • Dina Ayoub
  • Matt Ravenmoore

Project Management

Task Management

Domain Modeling

Entity Relationship Diagram

Users

UML Diagram

UML

Data Flow Diagram

Data Flow

MVP

  • REST API

How to use

ENV file

  • PORT
  • MONGODB_URI
  • BOT_TOKEN

Postman Instructions

Tests

Usage

  • to run tests, use the command 'npm test'

List of tests

Dealer tests

  • Can create a new dealer object
  • Can correctly throw an error if we try to start a game without any players
  • Can ask low bank players to buyin before start of hand
  • Can add a player to the game for next round
  • Can start a game using the start function
  • Can place bets for all non-dealers players
  • Can remove a player from the game for next round
  • Can deal a hand to each player
  • Can playerturn hit - add a card to the current Player's hand
  • Can playerturn stand - stop adding cards to the player's hand on stand
  • Can have dealer hit when their hand total is < 17
  • Can have dealer bust when their hand total > 21
  • Can have dealer stand when their hand total is >= 17 & <21
  • Can payout players correctly when dealer stands >=17 & <21

Next() function tests --> the function used in our API

  • Can start a game using the next function
  • Can place bets for all non-dealers players
  • Can deal a hand to each player
  • Can playerturn hit - add a card to the current Player's hand
  • Can playerturn stand after each player's turn - stop adding cards to the player's hand on stand
  • Can have dealer hit when their hand total is < 17
  • Can have dealer stand when their hand total is >= 17 & <21
  • Can payout players correctly when dealer stands >=17 & <21

Card tests

  • Can create a new card object

Deck tests

  • Can instantiate a new deck of cards

Hand tests

  • Can create a new hand object
  • Can add a card to a hand
  • Can add multiple cards to a hand
  • Can get the count of a hand with a face (K/Q/J)
  • Can get the count of a blackjack hand with a face (K/Q/J) and an ace
  • Can get the count of a hand with a face (K/Q/J) and ace and number
  • Can get the count of a hand with two aces
  • Can get the count of a hand with two aces and a card

Player

  • Can create a new player object

Shoe

  • Can create a new shoe object
  • Can fill the shoe with cards
  • Can get one card from the shoe
  • Can refill the shoe when shuffled
  • Can re-shuffle when <20% of the deck remains

Users

  • Can create & save a new user
  • Can retrieve an existing user
  • Can update a player

Resourcs

Discord Bot resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%