I grew up on Battleship, and once I learned how to program I thought it would be a fun challenge to re-make my favorite board game into a single-player online game.
For those familiar with the game, the only instructions I need to include are how to rotate the ships. As you drag the ship, press the R key on your keyboard to rotate the ship horizontal, and again to rotate it back to vertical. When placing the ships on the board, be sure they snap into place so the game knows where they are.
For those who are not familiar with the game, I will do my best to explain. The grid on top is the enemy territory, the grid on the bottom is your territory. Both teams have five ships: an aircraft carrier, which requires five hits to sink; a battleship, which requires four hits to sink; a destroyer, which requires three hits to sink; a submarine, which requires three hits to sink, and a patrol boat, which can take only two shots before sinking.
To play the game, move all the ships from your shipyard onto the blue grid, making sure that they all snap into place and none are overlapping. When ready, click the "Start Game" button below the grid. If all your ships are located properly, you will be allowed to continue, otherwise you will see an error message and have to restart. Once the game is started, click on a gridspace in the emeny field to fire. The square will turn white if you missed, and red if you hit part of an enemy ship. Try to uncover all the enemy ships before your own fleet is sunk! Good luck!