Skip to content

webcert/Battleship-JavaScript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Battleship-JavaScript

A very very simple Battleship game written in plain JavaScript: http://learntocodela.github.io/Battleship-JavaScript/

Read about the game and its rules here: https://en.wikipedia.org/wiki/Battleship_(game)

Step 1: Create your files

Useful references:

Step 2: Create a grid on your HTML page for the game board

Useful references:

Step 3: Model the game board in JavaScript and place ships

Useful references:

Step 4: Create event handler and write the game logic

Useful references:

Step 5: Play the game!

Play the game here: http://learntocodela.github.io/Battleship-JavaScript/

Features to implement next:

  • Display game messages within the HTML page instead of using alert()
  • Randomize placement of the ships at the start of each game
  • Make better graphics, maybe add sound effects?
  • Make a 2-player version of the game!

About

A very very simple Battleship game written in plain JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 76.3%
  • CSS 15.9%
  • HTML 7.8%