Simple word guessing game built using Azle for the Internet Computer Blockchain (ICP). Smart contracts only.
-
Clone the repository:
git clone https://github.com/wiztensai/azle-word-guessing-game.git
-
Prerequisites:
-
Node.js version > 16
-
DFX command line tools (version 0.16.1):
DFX_VERSION=0.16.1 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
-
Build dependencies:
Ubuntu:
sudo apt install clang sudo apt install build-essential sudo apt install libssl-dev sudo apt install pkg-config
macOS:
xcode-select --install brew install llvm
-
-
Install dependencies and deploy:
cd azle-word-guessing-game npm install dfx deploy
startGame()
: Starts the game and retrieves the initial word to guessrenderWord()
: Displays the word with some letters hidden, replaced by underscores.handleGuess(text)
: Processes the player's guess and updates the game state
- "azle": "^0.20.1"
- "uuid": "^9.0.1"
- Azle github: https://github.com/demergent-labs/azle
- Azle package documentation: https://demergent-labs.github.io/azle/the_azle_book.html
- Dfinity SDK documentation: https://internetcomputer.org/docs/current/developer-docs/backend/typescript/