Skip to content

SRPater/odin-battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship - JavaScript

A modern, browser-based implementation of the classic Battleship game, built as part of the The Odin Project curriculum. This project focuses on Test-Driven Development (TDD), Object-Oriented Programming (OOP), and complex state management.

Features

  • Two-Phase Gameplay: Transition from a manual ship placement phase to an active battle phase against a CPU.
  • Dynamic UI: Real-time board rendering that tracks hits, misses, and ship positions.
  • Collision Detection: Foolproof placement logic that prevents ships from overlapping or extending off the board boundaries.
  • Responsive Controls: Orientation toggle (Horizontal/Vertical) for strategic placement.

Tech Stack

  • JavaScript (ES6+): Module-based architecture.
  • Webpack: For asset bundling and development server.
  • Jest: Unit testing for game logic.
  • CSS3: Custom grid layouts and UI styling.

Getting Started

  1. Fork the repository to your own GitHub account.
  2. Clone your fork to your local machine.
  3. Install dependencies: npm install
  4. Run Development Server: npm start
  5. Build for Production: npm run build
  6. Run Tests: npm test

Acknowledgments

  • This project was completed as part of the JavaScript Course on the Full Stack JavaScript path on The Odin Project.

About

A JavaScript Battleship game built using Test-Driven Development (TDD). This project is part of the The Odin Project curriculum.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors