- Node.js version 6.3.1
- MongoDB (require 2 databases, one is game database and other is database for testing)
$ git clone https://github.com/ak1103dev/BattleShip
$ npm install
Please edit database host in config/default.json and config/test.json
$ npm start
$ npm test
Can see simulation in test/e2e.play.js
$ npm run play
POST /users
-- add userPOST /ships/:shipType
-- place a shipDELETE /ships/:shipType
-- remove a shipPUT /ships/:shipType
-- move a ship (unneccessary)POST /attack/:position
-- attack in a target squareGET /attack
-- get attack list (unneccessary)