This is a simple NFT-based game Dapp. It's features include:
- Mint NFTs to use as battle avatars.
- Allow users list all NFT avatars on the Dapp.
- Allow users list all NFTs avatar they owns on the Dapp.
- Battle avatars you control against other users' NFT avatars. Avatars have equal probability of winning, it's a game of chance.
- Install the CeloExtensionWallet from the Google Chrome Store.
- Create a wallet and create two accounts in it.
- Go to https://celo.org/developers/faucet and get tokens for the alfajores testnet.
- Switch to the alfajores testnet in the CeloExtensionWallet.
cd avatar-arena
npm install
cd avatar-arena
npm start
npm run build
cd avatar-arena
npx hardhat test
- Open different browser tabs.
- Mint NFTs with the different accounts on the Celo blockchain (in the Alfajores testnet) in the different tabs.
- Click the battle button on any NFT you own in the first tab.
- Click the start battle button on the new page you'll be redirected to.
- Once the battle has been started successfully on the first tab, repeat steps 3 and 4 on the second tab (with the second account).
- The battle result is displayed on the second tab and the win count on the NFT avatars change accordingly.
- To see the result on the first tab, the user has to manually navigate to the battle result page.
- A way to make influence the winning chances of an avatar by their battle history e.g total previous wins, etc.
- A list of previous battle results could be shown. Currently the Dapp only returns the last battle result.