Battleship
A classic grid-based strategy game implemented in vanilla JavaScript, demonstrating DOM manipulation, event-driven game state management, and a hunt-and-target AI opponent.
Battleship game with hunt-and-target AI in vanilla JavaScript
- ›Fully playable browser game with drag-and-drop ship placement
- ›Hunt-and-target AI with directed search after first hit
- ›Clean separation between game logic and DOM rendering
A browser-based Battleship game with AI opponent, drag-and-drop ship placement, and animated attack sequences. Built in vanilla JavaScript to practice DOM manipulation and event-driven state management.
Implement a fully playable browser-based Battleship game with an AI opponent as a JavaScript fundamentals project.
- No external libraries — vanilla JS, HTML, CSS only
- AI opponent must use hunt-and-target behavior, not just random shots
- Ship placement must support drag-and-drop and rotation
Vanilla JavaScript with module separation between game logic (ship placement, attack resolution, win detection), DOM rendering (grid generation, cell state updates), and AI (random hunt phase → directed target phase after first hit).