Skip to content

Play Battleship on a computer using Java and this great program!

License

Notifications You must be signed in to change notification settings

JonaZz747/Battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Battleship

With this simple Java program it is possible to play "Battleship" on your computer. The computer will place the ships automaticly on a 10x10 field made of JButtons. With a simple click on each position you can shot at it.

You can start a new game with CTRL+N or Menu, Game, New, all games can be closed with CTRL+x or Menu, Game, Quit. Sounds can be activated with Menu, Sounds, on or deactivated with Menu, Sounds, of.

If you want to play agains another person, just simply open Battleship several of times. Who first wins - wins ;)

Positions of the ships

The game will read the positions of the ships from "Battleship.jar / shipPositions.txt" (or "source-code / shipPositions.txt ). There are 10 different options of placing ships at this time. If you want to have more oportunities where the ships will be placed, use "easy calculate new ship positions.xlsx" and paste the binary-code in a new line of "shipPositions.txt"

Sounds

Sounds are being played at the beginning of the game, while quitting, while winning, when one ship sunk complete and during activating or deactivating of the sounds. Sounds can be changed under "Battleship.jar \ sounds" (or "source-code \ sounds.

Source-Code

Under "source-code / *" you can find the unpacked BlueJ-project. It is written in German.

About

Play Battleship on a computer using Java and this great program!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages