devklick / basic-blackjack Goto Github PK
View Code? Open in Web Editor NEWAn overly-simplified version of the Blackjack card game
Home Page: https://devklick.github.io/basic-blackjack/
An overly-simplified version of the Blackjack card game
Home Page: https://devklick.github.io/basic-blackjack/
One of the ways to win is by having the highest card. In such cases, even though face cards represent a value of only 10, they are not equal; queen beats jack, king beats queen etc.
At the moment, the logic to check if there's a winner by high score uses the "rank value" (10), so all face cards are seem as being equal. This needs to be updated to use a "global value" (which is a unique value each card has and can be used to determine the true order of value).
Currently the layout is pretty static and does not adjust to different screen sizes. This ticket covers the work to make the layout responsive.
PR #14 introduced responsive layout for the game, but I clearly didnt test enough. As a result, the layout is borked on smaller screens and in the desktop apps.
Consider adding some sound effects to the game, e.g:
Player should have won with a five card trick, but instead they are still in play and have the option to stick or hit for a sixth card, which should not be allowed.
Possibly related to #24 (late night coding on phone...)
With this being my first ever react app (in fact, first ever front-end app!), there's a lot of code smell going on. I want to clean this up at some point:
SomeComponent/SomeComponent
in my importsBut before doing any of this, and arguably more important:
Player should have won with the queen as the high card.
I've been working on updating the release workflow and its no longer publishing the windows installer.
Need to revisit this.
The app is currently still using the default icon. The web app deployed to github pages (https://devklick.github.io/basic-blackjack/) still uses the default react icon, and the desktop apps built with electron (https://github.com/devklick/basic-blackjack/releases) still use the default electron icon.
There are icons in src/icons, but they're terrible and need to be binned and properly designed.
The scope of this ticket covers desigining the icon and adding it to both the github pages deployment (should just be a case of replacing the favicon.ico
in the public
folder), and using the same icon for the electron apps (which is not something I've looked into much, but there's some docs on it here)
Sometimes different sound effects can overlap. This typically happens with the CardDealt sound and either the RoundWon or RoundLost sound. The reason this happens is that the as soon as a card is dealt the sound CardDealt sound starts to play, and before it has finished playing, the new card has triggered either a win or loss, causing the sounds to overlap.
I would rather avoid these overlapping sounds if possible.
One approach to doing so would be to keep track of all sounds that the game has triggered, and have these automatically removed form the list when the sound finishes playing. When it comes to playing a new sound, we could check the list of playing audio, stop and remove anything currently in the list, then add the new one to the list and start it.
Another approach could be to delay the game from calculating the result. Currently, a card is dealt after a delay, in order to have a pause between cards being dealt. This also means than when the initial cards are dealt, there's a slight delay before the first card is dealt, which isnt ideal. Perhaps a more suitable approach would be to delay after a card is dealt. This may allow enough time for the CardDealt sound to finish playing before the resulting process kicks in and causes either the RoundWon or RoundLost sound from playing
CRA is no longer maintained and Vite appears to be the best alternative. This tickets covers the work involved in migrating from CRA to Vite
To help make clear whether the dealer or player won the round, it might be good to either highlight the winners cards or dim down the losers cards.
At present, the only things that inform you who won the round is some text and the score.
The following will be considered:
Additionally (or alternatively), the space in the player names boxes could be utilized to add some more information that highlights the winner. The following will be considered:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.