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.
- 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.
- 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.
- Fork the repository to your own GitHub account.
- Clone your fork to your local machine.
- Install dependencies:
npm install - Run Development Server:
npm start - Build for Production:
npm run build - Run Tests:
npm test
- This project was completed as part of the JavaScript Course on the Full Stack JavaScript path on The Odin Project.