Check out: my github
Game starts
WELCOME TO THE BATTLESHIPS WAR. You have to Destroy 3 ships to win
|0||1||2||3||4||5||6| Y
|0||-||-||-||-||-||-||-|
|1||-||-||-||-||-||-||-|
|2||-||-||-||-||-||-||-|
|3||-||-||-||-||-||-||-|
|4||-||-||-||-||-||-||-|
|5||-||-||-||-||-||-||-|
|6||-||-||-||-||-||-||-|
X
While playing
Next ROUND... READY?!
This is your 7's shoot... GO
Log in Location XY to FIRE:
41
HIT
|0||1||2||3||4||5||6| Y
|0||-||-||-||-||-||-||-|
|1||-||M||-||-||M||-||-|
|2||-||H||M||-||-||-||-|
|3||-||H||-||-||-||-||-|
|4||-||H||-||M||-||-||-|
|5||-||-||-||-||-||-||-|
|6||-||-||-||-||-||-||-|
X
You have shoot 7 times
Great! you've Terminated NAPOLEONSHIP
And conquere
42
HIT
|0||1||2||3||4||5||6| Y
|0||M||-||-||M||H||H||H|
|1||-||M||-||-||M||-||M|
|2||-||H||M||-||-||M||-|
|3||-||H||H||-||M||-||-|
|4||M||H||H||M||-||M||M|
|5||-||-||H||M||M||M||-|
|6||-||-||M||M||M||-||-|
X
You have shoot 30 times
Great! you've Terminated ANGELASHIP
Great! you've Terminated HITLERSHIP
Great! you've Terminated NAPOLEONSHIP
Next ROUND... READY?!
YOU DESTROYED ALL SHIPS! CONGRAT you win after 30 attempts
If you want to cheat
uncomment this code and all the location of the ship will be printed out before the game start
public Ship () { createRandomLocation(); // System.out.println("A new ship is created"); // for (int [] arr : this.shipLocation) { // System.out.println(Arrays.toString(arr)); }
like this:
A new ship is created
[2, 2]
[2, 3]
[2, 4]
A new ship is created
[5, 1]
[5, 2]
[5, 3]
Angela is created
Hitler is created
There maybe more than 3 ships but take the last three result. The ships crashed are eliminated