/Battleship

A classic game of Battleship.

Primary LanguageJavaScript

Battleship


Motivation

I wanted to build something close to the classic Battleship game to push my self and challenge my coding skills.


Screenshots

playing grid


  • Main Menu

    • The player can start a classic gamemode by pressing Classic Mode.
    • The player can start an advanced game mode by pressing Advanced Mode.
    • The player can start a Timed mode by pressing Timed Mode. main menu
  • Setup

    • The player drags his game pieces onto a generated grid that represents his/her side of the field.
    • The player uses R to rotate the pieces 90° or -90°
    • When all pieces are set, the player presses the start button. main menu
  • Gameplay

    • The player selects a random grid square on the opponent’s grid space.
    • Both sides generate points by successfully landing a hit.
    • The player can restart or end the game at any time in a menu.
      • Classic Mode

        • Player wins by eliminating the enemy fleet. Classic Mode
      • Advanced Mode

        • The player has the option of spending points to deploy an ‘airstrike’ which strikes multiple grid spaces at once.
        • The player can spend points to ping a single occupied grid space.
        • The player can deploy a nuke to wipe the opposing fleet out. Advanced Mode
      • Timed Mode

        • The player wins by accumulating the most points or eliminating the opposing fleet before the timer runs out. Timed Mode

Technologies

  • HTML/CSS/JS

Credits

A special thanks to my instructors for helping me get to where I am with this and also to @jcLucio for some inspiration.


Future Development

  • Fix rotation issues.
  • Add computer combat
  • Random placement for computer pieces.
  • Add win/losing screen