A test-driven incarnation of Battleship created with React and tested with Jest.
In the project directory, you can run:
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode. See the section about running tests for more information.
This project was built in order to put into practice the basics of test-driven development. All player interactions were unit-tested with Jest.
For this project, I set out to build a beautiful recreation of the game of Battleship, with an original animated character representing the enemy AI. Putting together the game logic with extensive use of React hooks and state proved difficult. I solved this by focusing on keeping state as simple as possible, holding only the data needed to render the game.