Skip to content

A simple battleship game using vanilla javascript, html and css

Notifications You must be signed in to change notification settings

xiaomei-wu/game-battleships-vanilla-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The challenge is to program a simple version of the game Battleships.
Create an application to allow a single human player to play a one-sided game of Battleships against ships placed by the computer.
The program should create a 10x10 grid, and place a number of ships on the grid at random with the following sizes:
1x Battleship (5 squares)
2x Destroyers (4 squares)
The player enters coordinates of the form “A5”, where "A" is the column and "5" is the row, to specify a square to target. Optionally, you can use also the mouse click on the cell.
Shots result in hits, misses or sinks.
The game ends when all ships are sunk.

recording-2024-01-20-22-21-49.webm

About

A simple battleship game using vanilla javascript, html and css

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published