Skip to content

JohnPaton/blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning JavaScript syntax with Blackjack

A simplified version of Blackjack to teach myself a bit of JavaScript syntax. No betting or splitting, only hitting or standing, 1v1 against the dealer.

To try the game, head over to johnpaton.net/blackjack.

If you prefer to run it locally, clone this directory and then serve the page locally using the following commands:

git clone https://github.com/JohnPaton/blackjack
cd blackjack
python3 -m http.server 8080

Now navigate with your browser to http://localhost:8080/ to play! Hit ctrl-c to kill the server when you're done.

The python directory contains a Python module providing the same gameplay as a cli. I did this quickly for my own reference, so that the logic would be mapped out and I could focus on thinking about the syntax of a new language. After cloning the repo, you can try it yourself with:

cd blackjack/python
python3 -m blackjack

Have fun!

About

♠️ A simple blackjack game to teach myself JavaScript syntax

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published