0.3.13-beta • Published 1 year ago

aart-blackjack v0.3.13-beta

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Blackjack (Not the casino game 21)

Blackjack is an incredibly fun game which you can play with two to seven players. We do not mean the famous casino banking game which is also often called 21. The Blackjack we mean is similar to what is referred to as English Blackjack, but the rules have been written based on how I remember playing from childhood with family and friends. The objective of the game is to be the first player among multiple opponents to empty their hand. Players may also immediately spot that the gameplay is almost identical to Uno, the famous game invented around 1971. Both Uno and English blackjack are probably derived from Crazy eights or formerly Eights which appeared around the 1930s. What makes Blackjack an exciting game is that it relies on both skill and chance, and it is a volatile game where circumstances can change in a mere few turns.

There are many tactics one can use to improve their likelihood of winning the game, however, chance has a large share of say in the outcome, meaning first timers can often beat experienced players. Games often occur where you are holding 20 cards with no hope of winning in sight, and then the right card enters into play and allows you to chain an avalanche of cards, taking you to the top of the race to finish. Or there are games where you have one card left, with victory in sight, and your opponent flanks you with a stacked 2, or a blackjack. Or there even are times where you are in a standoff, neck and neck with one or more opponents, both with only a single card left. There are games where your opponent has been playing conservatively, seemingly uninteresting and far from winning, unbeknownst to you they are holding both blackjacks, or perhaps some 2s, or they could be holding onto a fatal chain of winning cards, waiting for the right moment.

Requirements

Stable version of NodeJs ( with Node Package Manager):

recommended version 18.15.0 or any higher LTS version https://nodejs.org/en

A Secret Network testnet account and mnemonic.

You can easily setup a secret network testnet address using keplr: https://keplr.crunch.help/en/getting-started/installing-keplr-wallet

If you already use keplr, it is strongly recommended that you create a new, separate account from your primary one anyway:

Open the keplr app and select 'add account' in the top right corner, then choose 'create new account' to generate a different mnemonic, set account name such as 'blackjack-account' so you know it is not your primary one . In short, do not supply your primary account's mnemonic phrase even if only using the testnet.

Keep a note of your game account's 12 / 24 word mnemonic phrase.

Once setup, make sure keplr is using your game account and connect to the SecretNetwork testnet using this link: https://connect.pulsar.scrttestnet.com/

Use a testnet faucet, add scrt tokens to your testnet address: https://faucet.pulsar.scrttestnet.com

app installation via npm:

To make the app available in your terminal, make sure to include the '-g' flag when using npm as follows:

npm i -g aart-blackjack

Startup:

To start the app in a terminal session, run

aart-blackjack

in Linux and macOS, or

aart-blackjack.cmd

in windows command-line or powershell.

setting up your app

Note: to open the settings menu any time, press 'shift' and '+' key together (if a prompt input is active, press 'shift' and '+', then hit 'enter' ). To exit the application, press escape key or Ctrl-C.

When you startup for the first time, you will be alerted that you need to set your wallet using your mnemonic phrase. your mnemonic phrase is used by secretjs, a trusted JavaScript SDK to connect to the network and interact with the smart contract. The phrase is stored locally in a text file on your device's home directory in the hidden folder {your home dir}/.aart/blackjack/.env.

After pressing enter to close the alert, you will be taken to the settings menu, where you can choose the 'set wallet' option by entering 5. A prompt will allow you to enter your phrase separated by spaces. (click the middle mouse button / scroll wheel to paste from clipboard, or enter manually).

Alternatively you can directly add your mnemonic phrase to the dotenv file located in your home directory.

e.g. ~/.aart/blackjack/.env, by adding the line:

MNEMONIC='<your mnemonic phrase here>'

Make sure that the phrase is correctly typed/pasted, is inside single quotation marks, and entered on a single line. Also make sure you do not change anything else in this file.

Next you will be alerted that you need to set a viewing key, and then taken to the settings menu.

A viewing key is used to make private queries on the secret network, this allows you to view your cards while preventing other players from being able to see them on the blockchain. The viewing key is stored inside the dotenv file. If you use another device later, you will have to either copy over this viewing key, or set a new viewing key, overwriting the old one.

Select 'generate viewing key' in the settings menu by entering index 0. If you get an error, check your network connection, and that your mnemonic phrase is correct.

You may now quit the settings menu by entering 'q'. You will then be taken to the dashboard.

Using the user friendly UI, you can join public games, play privately with friends and compete in weekly tournaments, winning prizes. For more info on how to use the terminal UI, including how to play blackjack, view the google doc:

https://docs.google.com/document/d/1gZKyhDEt9Bb7p6Lb5xmXUYwJGdQrV5BWb592vgdoERI/edit?usp=sharing

beta-testers welcome

This application is in beta and currently testnet only, expect some strange behaviour from time to time, over the course of its development gameplay and UI may change. If something's is broken, usually restarting the app, or selecting a different endpoint in the settings menu will make it go away, but please tell us about any persistent errors, and we may be able to help you.

updates

You can easily update you app by rerunning npm i -g aart-blackjack. Your account / settings will be saved, and you will only need to regenerate your viewing key per update. There is currently no support for backend migration, so you will have to set your username each major update for now.

contact

Help us fix bugs by reporting any broken behaviour, or ask us questions:

0.3.13-beta

1 year ago

0.3.12-beta

1 year ago

0.3.11-beta

1 year ago

0.3.10-beta

1 year ago

0.3.9-beta

1 year ago

0.3.8-beta

1 year ago

0.3.7-beta

1 year ago

0.3.6-beta

1 year ago

0.3.4-beta

1 year ago

0.3.3-beta

1 year ago

0.3.2-beta

1 year ago

0.3.1-beta

1 year ago

0.3.0-beta

1 year ago

0.2.11-beta

1 year ago

0.2.10-beta

1 year ago

0.2.9-beta

1 year ago

0.2.8-beta

1 year ago

0.2.7-beta

1 year ago

0.2.6-beta

1 year ago

0.2.5-beta

1 year ago

0.2.4-beta

1 year ago

0.2.3-beta

1 year ago

0.2.2-beta

1 year ago

0.2.1-beta

1 year ago

0.2.0-beta

1 year ago

0.1.5-beta.rc.2

1 year ago

0.1.5-beta.rc.1

1 year ago

0.1.5-beta

1 year ago

0.1.4-beta

1 year ago

0.1.3-beta

1 year ago

0.1.2-beta

1 year ago

0.1.1-beta

1 year ago

0.1.0-beta

1 year ago

0.0.17-beta

1 year ago

0.0.16-beta

1 year ago

0.0.15-beta

1 year ago

0.0.14-beta

1 year ago

0.0.13-beta

1 year ago

0.0.12-beta

1 year ago

0.0.11-beta

1 year ago

0.0.10-beta

1 year ago

0.0.9-beta

1 year ago

0.0.8-beta

1 year ago

0.0.7-beta

1 year ago

0.0.6-beta

1 year ago

0.0.5-beta

1 year ago

0.0.4-beta

1 year ago

0.0.3-beta

1 year ago

0.0.2-beta

1 year ago

0.0.1-beta

1 year ago

0.0.0-beta

1 year ago