A JavaScript implementation of a custom card game. Card battle is both a fun solitaire and multiplayer game since you can play against the A.I.(novice). The current version of the game can be played on GitHub Pages by clicking here.
The goal of the game is eliminate your opponent by lowering their hitpoints to 0 first. All 10 cards have the same option to attack, defend, or skip.
Click a card to call it to action. The game checks the attributes of the selected card: attack and defend. If the selected card attacks, the opponent will have their hitpoints deducted by the attack subtracted by the defending cards defense. You can regain hitpoints by selecting a card and using defense. The first player to 0 hitpoints loses.
Installation instructions: npm i
On MySQL CLI: run SOURCE db/schema.sql
On CLI: run npm run seed
Create an .env file in the root directory with three variables with your respective credentials: DB_NAME='database name' DB_USER='user name' DB_PASSWORD='SQL password'
To play this game, you either need to sign in or play as a guest. If you are playing as a guest, you cannot pick your own deck or save your score. If you chose to sign in you will first have to customize your deck. After that you can then play. The rules of the game are simple. First select the card you would like to play. After that choose what you would like to do. You can either skip, defend, or attack. Skip allows you to change turns without playing a card. Defend allows you to heal yourself. Attack allows you to do damage to the enemy AI. The game is over when either the AI or player reaches 0 hp.
Morgan Tolman
Jerome Nixon
Tristan Saragosa
Leo Roccaforte
James Xalis
This application uses the MIT license.
If you would like to contribute, first fork the application from github then make a pull request with a detailed description of why you think this would improve our game.
N/A
