Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ytasheva/blackjack-game
JavaScript Blackjack game
https://github.com/ytasheva/blackjack-game
Last synced: 14 days ago
JSON representation
JavaScript Blackjack game
- Host: GitHub
- URL: https://github.com/ytasheva/blackjack-game
- Owner: YTasheva
- License: mit
- Created: 2023-11-19T20:36:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-20T23:17:30.000Z (about 1 year ago)
- Last Synced: 2024-11-24T17:11:46.074Z (2 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blackjack-Game
## Table of contents
- [Overview](#overview)
- [The Challenge](#the-challenge)
- [Rules for Blackjack Game](#rules-for-blackjack-game)
- [Hints](#hints)
- [Screenshot](#screenshot)
- [Links](#links)
- [Built With](#built-with)
- [Author](#author)## Overview
### The Challenge
- Construct a simple Blackjack game.
### Rules for Blackjack game
* Create a simple blackjack game with the following properties:
* Deals the player a random number between 4 and 21 inclusive.
* If the player has 21 they win!
* Deals a random number between 2 and 11 inclusive to the dealer.
* If the player hits, add a number between 2 and 11.
* If the player goes over 21 the lose.
* If the player has 21, stay for them.
* Repeat until they choose to stay or they bust
* Once player stays add a number between 2 and 11 to the dealer's hand.
* If dealer number is less than 17 add another number
* Repeat until the number is over over 17 but less than 21, or if the dealer goes over 21
* If dealer goes over 21 they lose.
* Once dealer stops, and neither player bust, compare each number to 21. Whoever is closer wins!* Pseudocode the outline of your game before you write any code.
* Create functions if you begin to repeat yourself.
### Notes
This is a difficult challenge. How you build this game is up to you. The goal here is to demonstrate when to use functions. If at any point you begin to type the same line of code, or if your code becomes unreadable, consider a function!
## Hints
* Be sure that your random number generator is inclusive of the outer numbers.
* We've used a lot of `for` loops. Don't forget that there are other types of loops.### Screenshot
### Links
- Solution URL: https://github.com/YTasheva/Blackjack-Game
- Live Site URL: https://ytasheva.github.io/Blackjack-Game/
### Built With- JavaScript, HTML, CSS
## Author
- Github - [Yuliya Tasheva](https://github.com/YTasheva)