Blackjack
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
Blackjack
https://gitlab.com/christosangel/blackjack
This is a version of the classic game Blackjack, something I wrote in javascript.
The user is the player, the computer is the dealer.
To install and play the game , just follow the (simple I hope) instructions.
Additionally, for an even better experience I would suggest playing this game using Web app.
Any feedback is most welcome!
This is a version of the classic game Blackjack, something I wrote in javascript.
The user is the player, the computer is the dealer.
To install and play the game , just follow the (simple I hope) instructions.
Additionally, for an even better experience I would suggest playing this game using Web app.
Any feedback is most welcome!
Last edited by LockBot on Tue Apr 25, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Blackjack
not bad, works
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
Re: Blackjack
Thanks for doing this. As a side-note, I ran across a blackjack game on SourceForge. Published in 2014. Unfortunately it did not work under Mint 20.1 (I tested the Blackjack game in early 2021.) Maybe there is some useful information for you in that program.
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
Re: Blackjack
I have checked this source, and
- added an alert each time the deck is reshuffled
- added the 3:2 return of bet in case of blackjack
- differentiated the final message after 10 hands, depending on the gain or loss of the initial sum.
- I have adjusted and added the rules to README:
"These are the rules of this version of the game.
The object of a game of blackjack is to get a hand of cards that has a value of 21 without going over 21 (which is called "busting"). The player plays against the dealer, who is also trying to get to 21 without busting.
A hand of blackjack normally goes like this:
The 52 card deck is shuffled (the player will be alerted each time the deck is reshuffled).
The player and the dealer are dealt one open card each.
The cards have a "value" equal to the number printed on a card, regardless of set. Kings, Queens and Jacks are all worth 10, and an Ace is worth 11, unless the player would bust, in which case the Ace is worth 1.
If the player gets a card with a value of 10 and an ace, he has blackjack, he has automatically won the round and his bet is paid back 3:2.
In any other case, the player can keep on hitting, or choose to stand when he thinks it is apropriate.
If the player stands and hasn't busted, the dealer has to hit until he has a value greater than the player's, then stands.
The values of the two hands are compared, and the higher value wins.
After 10 hands, the player is presented with his total cash, and is asked whether he wishes to play again."
I am not sure if I am going to incorporate other features of the game, like the split or double funcionality. I think would rather keep this game simple.
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
Re: Blackjack
Also, I added a closed card as well to the dealer and to the player at the beggining of each hand
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
Re: Blackjack
After doing some improvements on another project (namely bucket https://gitlab.com/christosangel/bucket), it was natural to incorporate these changes to Blackjack.
By clicking on the settings image 🛠, right next to the slide, the user can set the appearance of the game according to his liking.
The user can set
By clicking on the settings image 🛠, right next to the slide, the user can set the appearance of the game according to his liking.
The user can set
- the background color
- the back image of the deck
- Keys that hide / show again the game (boss key )
- Sound On / Off
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
-
- Level 1
- Posts: 18
- Joined: Mon Oct 24, 2022 12:24 am
Re: Blackjack
I'm like it. I've never played blackjack. Here I tried
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
Re: Blackjack
I am glad you like itStrangeAngel wrote: ⤴Thu Nov 24, 2022 2:21 pm I'm like it. I've never played blackjack. Here I tried
- christosangelopoulos
- Level 3
- Posts: 152
- Joined: Fri Nov 13, 2020 10:19 pm
Re: Blackjack
Updated the program in order to incorporate the logic and settings evolved in the other "twin game" called Bucket I wrote along with this.
Clicking on the Settings button the user can set
Clicking on the Save or Load button, the user can save/load settings to/from a file.
The files saved from the Bucket game can be used with this game, too, and vice versa.
Clicking on the Settings button the user can set
- the background color
- the deck of cards
- the back image of the deck
- the Initial Sum
- Prefered currency and format (currency symbol before/after the sum)
- Key that hides/shows again the game (boss key )
- Sound On / Off
Clicking on the Save or Load button, the user can save/load settings to/from a file.
The files saved from the Bucket game can be used with this game, too, and vice versa.