npm i and then you can run it with the command: node index.js
And then you can see our game by address localhost:3000
Before start you probably need to run this line of code so it will correctly work with Database: mysql -p dbname -u > db.sql
The objective of the game is to reduce your opponent's base HP to zero while protecting your own base.
Each player starts with 6 cards in their hand. Each card has three values: mana cost (MC), card name, and attack (ATK). The mana cost represents the amount of mana required to play the card, and the attack value represents the amount of HP the card deals to the opponent's base (or gains for your own base if it's a negative value). Both players start with a base HP value, typically set to a certain number, e.g., 20 HP.
The game is played in turns, with each player taking one turn at a time. At the beginning of your turn, increase your maximum mana by 1, which will be used to play cards. During your turn, you can do the following actions:
- Play cards from your hand by paying their mana cost from your current mana pool. You can play as many cards as you can afford with your available mana.
- You can also choose not to attack and save your cards for later turns.
After taking your actions, end your turn with button PASS.
