![](https://github.com/xewar/projectThumbnails/raw/886a13e60bacd355e3d8b85fc9b9c0b804a624dd/Battleship.png)
A digital version of the classic game. You can view the live project here.
In this project I practiced:
-
Code:
- test-driven development and unit testing with Jest
- writing recursive functions to generate the computer/opponent's behavior
-
Design
- dragging and dropping objects
Helpful Resources
- JavascriptTutorial.net's tutorial on dragging and dropping.
- The battleship icon is by Atif Arshad, from the Noun Project
Potential future updates
- Make the computer smarter so it guesses adjacent squares when it hits a human ship
- Add ghost versions of the ships so that you can visually track how many ships you've sunk
- Make the gameover message more prominent