Battleship Game

Classic game hand-made with vanilla Javascript.

Screenshot of the Battleship game

I developed this classic location-guessing game using vanilla JavaScript. Besides learning the basics of JavaScript, I also wanted to practice creating reusable code, making clear notes for future maintenance, and avoiding overly verbose code.

In order to achieve this, I took a varied approach of consulting reference books, forums (thank you, StackOverflow!), trusted YouTuber's demo videos, and a very patient coder friend.

Active Game View:

Full screenshot the Battleship game during play

Code Snippets:

Code snippet of the view object
Code snippet of the checkOverlap function

Like what you see?

Start the conversation now by clicking through that pretty lil' red button below.