Advertisement
apalash1

BattleShip.java

Mar 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. BattleShip
  2.  Game of Battle Ships: Consider a 12x12 grid as the battleship board. Some ships are deployed there in the grids which are hidden from the Player. Ships’ sizes can vary from 2 to 4 blocks and can be deployed horizontally or vertically. The goal is: Player will drop bombs in the field randomly. If a bomb hits a ship, the ship will be completely destroyed. a. It has the method to deploy the ships. The number of ships are as follows (5x1), (4x2), (3x3), (2x4) b. It has the method for displaying the board. 0 – empty; 1-ship; X-destroyed c. It has the bombing method for player.
  3. download file from here: http://linkshrink.net/7mFHsW
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement