Battleship is a game app; it has two players those are computer vs human.
- When the game starts, the computer and human have each board with hidden located ships.
- The human player tries attacking one each time, miss-attack hits water which has water-colour.
- And human attacks the located ship, the hit ship has a red colour, and sunk ship changes dark-grey colour.
- If one of the players attacks all the ships, the player wins the game.
- Aircraft carrier(5)
- Battleship(4)
- Cruiser(3)
- Submarine(3)
- Destroyer(2)
The main requirement is here.
- Javascript: ECMAScript 2015 (es6)
- Jest test
- HTML 5
- CSS 3
โจ Live Demo
Clone the repository to your local machine
$ git clone https://github.com/shjang7/battleship.git
Change directory into the directory
$ cd battleship
Install npm
$ npm install
Test check no errors. When it passes, move on.
$ npm test
Build codes
$ npm run build
Open server
$ npm run server
Go to execution file directory in your browser
./dist/
Read the game rule at first screen; the game rule will decrease the size after some moment.
๐ค Suhyeon Jang
๐ค Grace Mugoiri
- Github: @mugos
- LinkedIn: @grace-mugoiri
- Twitter: @GraciaMugoiri
- Fork it (https://github.com/shjang7/battleship/fork)
- Create your feature branch (git checkout -b feature/[choose-a-name])
- Commit your changes (git commit -am 'what this commit will fix/add')
- Push to the branch (git push origin feature/[chosen-name])
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details