This is the client-side repository of the Battleship 2
game.
The server (NodeJS) repository is hosted at https://github.com/battleship2/battleship2.0-server.
The client relies on several well-known libraries such as:
Important note about Gulp: The project is configured to use Gulp v4 and above. Please refer to this link to check how to configure it in your environment.
From the project's root directory, type the following commands:
npm install
-> Install the required NPM dependenciesgulp
ornpm start
-> Start the project
While we do our best to get the whole project tested, do not hesitate to PR us if you ever find a bug. To launch all the tests, type the following command:
npm test
The project offers a few helpers to make the running up faster. Refer to this guide to know how and when to use them.
gulp clean
: Clear the temporary files and set the project into a clean state.
-
gulp build
: Build and prepare the files into thedist
directory with development target. N.B: This does not compile the project for release purposes. Seegulp build:prod
for that. -
gulp build:staging
: Build and prepare the files into thedist
directory with staging target. This step imitates the production bundle with all the development assets (console logging, debugging, tools, etc.) N.B: This does not compile the project for release purposes. Seegulp build:prod
for that. -
gulp build:prod
: Build and prepare the files into thedist
directory with production target. Will produce a minified, optimized bundle for fast delivery into browsers.
Please note that each of the above environments is configured through a property file (see ./src/environments/environment[.TARGET].ts
).
- Finish Angular 2 migration
- Check for warning when leaving or refreshing page if a game is playing
- Plug hits counter to server response
- Plug ships destroyed counter to server response
- Create ships depending on server game configuration
- Set state according to who starts first (from server)
- Draw player bombs
- Check that the bomb coordinates have not already been hit
- Send bomb coordinates to server
- Save player bomb
- Draw opponent bombs
Logo made with ❤ by Arun Thomas from Iconfinder