Skip to content

Go implementation for the popular battleship game

License

Notifications You must be signed in to change notification settings

nbaztec/battleships

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleships

Go implementation for the classic battleship game.

Demo site: battleships-dot-nbaztec.ey.r.appspot[dot]com

The frontend uses jQuery and Bootstrap.

Run

$ make run

Gameplay

Game can be played between 2 players. Visit the root url http://localhost:8080 to start a game. The optional gid query parameter may be provided to specify the game room. If the gid parameter is omitted, a random gid will be generated.

The second player should visit the same game URL as specified in the UI (with the same gid). Once both players are on the same URL, the game begins. Players then set their respective battleships and press Ready. The ship orientation can be controlled via the provided button or the Shift Key. The ship placement may be reset via the Reset button or by pressing the Esc key.

Once both players are ready, they take turns guessing the opponent's ship locations.

The game is over when either of the condition holds:

  • Player sinks all of their opponent's ships
  • Player chooses to Resign

Once the game is finished, the players have an option to request Rematch

Resources

All packaged resources (sounds and icons) are available under their respective CC License.

About

Go implementation for the popular battleship game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published