Skip to content

ahmed-mgd/battleship

Repository files navigation

Battleship

Compete against the computer in the classic game of "Battleship." Implemented using vanilla JavaScript.

Live Demo: https://ahmed-mgd.github.io/battleship/

screenshot

Installation and Usage

Clone the repository and navigate into the directory. Run:

npm install

To run the game in a development environment:

npm run dev

To run test fixtures:

npm test

Lessons Learned

  • Setting up and unit-testing with Jest.
  • Enumerating different states makes it easier to keep track of game logic.
  • More time should be spent in the planning stage determining how different components of the project should interact.

Future Implementations

  • Drag and drop board setup for the user
  • Dashboard displaying each user's fleet and sunk ships
  • Integrate AI or algorithmic logic for CPU play

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published