A simplified version of the classic Battleship game. A work in progress.
A single player is allowed to play against a computer opponent. The computer makes random moves, though once it has successfully hit a ship, it targets the surrounding cells to try until the ship has been sunk.
The opponent has a board of their own which the user can see, but cannot see the ships for (unless they land a hit), similar to a standard battleship game.
- TypeScript
- React + OpenColor + CSS
- Node.js + Vite
- Jest + React Testing Library
- Clone the repo & install it locally
- Run
npm install
to grab all of the necessary dependencies - From the installed directory, run
npm run dev
- Vite will spin up a local dev server (likely on localhost:5173) - Navigate to the page, and start playing Battleship!
The demo version of the client-side app can be found here, deployed to Vercel.
I hope to continue to build this out to add or improve the following features:
- Increase test coverage
- A11y features
- Mobile UI (Replace right-clicks with double-clicks, for example)