Code

Discussion on 21: Twenty One

Discussion on 21: Twenty One

Cart 23 sales

elkranio supports this item

Supported

4 comments found.

Well it’s a nice game. Is there an easy way to link it to the backend to log the wins?

Hi. It depends on the task to be honest. If you want just to store a log of some player’s actions, then it’s not that hard to add a request to a backend after each hand.

But if you want to create a casino-like experience, you’d probably want to move the actual RNG module to the backend and feed results to the client side so no one can cheat.

hi, how should i hide second card of dealer until player clicks stop?

Hi. You’ll need to modify the controller script. It is located in the “src/app/scenes/game/controllerController.js”

This controller processes the game flow and it can be used to add the blackjack rules to this game.

Cheers.

hi, how can i change like Ace become value 1 when there’s 3 cards?

Hi! Thanks for reaching out.

There is a script file called Hand.js that is located in the “src/app/scenes/games/hands” folder.

It has a get method called sum() that is responsible for calculating a hand’s total value. You can edit it to make sure it calculates the way you intend it to.

Cheers.

Hey, great game! I just wanted to ask if it is easy to change the values of the cards: I’m used to K/Q/J being worth 10 (blackjack rules). Thanks!

Hi! Thanks for reaching out. It’s very easy to update the card ranks, you’ll need to change one file.

You’ll need to re-build the files though as the game uses webpack to build all the files into a single entity. But that’s relatively easy to do.

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey