It is a two-player web-based board game for participants qualified for mains level of Technothlon
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
ArtOfWar is a two-player web-based board game for participants qualified for mains level of Technothlon.
To get a local copy up and running follow these simple steps.
-
npm
npm install npm@latest -g
-
nodemon
npm install -g nodemon
-
mongodb
https://docs.mongodb.com/manual/installation/
-
Clone the repo
$ git clone https://github.com/theprakharrajpali/ArtOfWar.git
-
Change Directory
$ cd ArtOfWar $ cd techno-static
-
Install NPM packages
$ npm install
-
Running the database (in a new terminal)
$ mongod
-
Running Server (in a new terminal)
$ npm run server
-
Running the game (in a new terminal)
$ npm start
-
Opne the following links in your browser:
http://localhost:3000/ (open in two browsers for playing)
Capture the flag of opposing team
You have 33 movable pieces. Each piece has a rank which is the number on it. You have 1 flag and 6 bomb, which are not movable. This makes a total of 40 pieces.
Board is 12 x 10 rectangular grid. There are two lakes in middle. Your piece cannot move on lake.
-
Arrange Your Pieces On board by clicking on panel and then clicking board. You can arrange in only first 4 rows. You can interchange pieces on board by clicking them and swapping them.
Note: you can rearrange the pieces only before clicking ready.
-
The way your opponent arranged his/her pieces is hidden to you..
-
Once you and your opponent are both ready, the game will start. The timer will start running. Both player will be given twenty minutes each.
-
For moving pieces, you can click on it and move to any one of the green highlighted pieces in 4 directions.
-
On clicking your piece, if there is an opponent piece in neighbouring squares, it will be highlighted purple. You can click on purple square to attack on opponent's piece.
-
If you capture opponents flag or your opponent's timer runs out or if opponent resigns, you win.
-
A piece can move to any of its neighbouring squares in one of the four directions, if they are free. These squares will be highlighted.
-
If piece(attacking piece) has opponent's piece(defending piece) in neighbouring square, it can attack it. Piece with higher rank wins and losing piece is removed from the board. Winning piece will placed on defending piece's square.
-
In case there is a tie, both pieces will die.
-
Spy(rank 1 or S) and Bomb have special privileges.
Spy :
It is a special piece. It is of lowest rank in movable pieces. BUT, if it attacks any piece(apart from bomb), it will always win. But if any other piece attack on Spy, Spy will always lose.
Bomb :
It is an immovable piece. Its position is fixed from the start of the game. If any piece(including Spy) (except rank "3") attacks on Bomb, it will blast in 3 x 3 squares around it. Any enemy piece(s) in the radius will die. The bomb will also die/removed. If Rank 3 attacks Bomb, Bomb will die.
-
Flag :
It is immovable but most important piece. If you lose flag , you lose the match.
HINTS for defending: You can keep your flag at edges or corners and surround it with bombs and maybe a high ranking piece.
- For each piece you capture, you will get points equal to its rank. For eg. : if you capture a piece of rank 8, you will get 8 points.
- In case of tie, you won't get any points.
- For each bomb you diffuse(attacking a bomb with rank 3), you will get 5 points.
- If you cature a spy, you will get points equal to rank of piece you captured it with. For eg. : if you capture a spy using rank 6 piece, you will get 6 points.
- If you win the match, you will get 180 points.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Prakhar Rajpali - @prakharrajpali - [email protected]
Project Link: https://github.com/theprakharrajpali/ArtOfWar