Skip to content

The classic game of Battleship now in your browser. Sink all of the cat pirate's ships before he sinks yours!

Notifications You must be signed in to change notification settings

zainthedev/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship

A test-driven incarnation of Battleship created with React and tested with Jest.

View live

Screenshots

Available Scripts

In the project directory, you can run:

yarn start

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.

yarn test

Launches the test runner in the interactive watch mode. See the section about running tests for more information.

Reflection

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.

About

The classic game of Battleship now in your browser. Sink all of the cat pirate's ships before he sinks yours!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published