Menu
support@authoritypapers.com
+1(805) 568 7317

needs java battleship part 1 in this assignment we recreate the 2 player game quot b 5149918

Needs Java!Battleship Part 1 In this assignment we recreate the 2-player game Battleship. This assignment will give you lots of practiB1 is hit Then there is the players guess board that would look like this after this series of guesses: C3, A4 D1 85 You sunk

Battleship Part 1 In this assignment we recreate the 2-player game “Battleship”. This assignment will give you lots of practice with two dimensional arrays. There will be a second part of the assignment that is a Bonus. In part 1, we will make a one player version and we will start with our ships in set positions This makes it easy for you in testing your program, and easy for me to help you. In part 2 we will deal with randomized ship placements. Battleship starts with two boards for a player. There is a board with the ships location, and a second board for the players guesses. Each guess is marked at a “hit” or a “miss”. On the final hit on a ship, the guesser is told that they have sunk the ship Here is the Ship Location Board that we will use in Part 1: 1 2 3 4 2 2 C 3 D 3 E 4 4 4 Where the numbers in the grid mean the length of that ship. The ship of length 2 is called the Patrol Boat, of length 3 is the Destroyer and of length 4 is the Battleship. t B1 is hit Then there is the players guess board that would look like this after this series of guesses: C3, A4 D1 85 You sunk tho Patrol Boat ENEMY 1 2 3 4 5 A 0 A O BX Bi D F Please enter a quess in the form 'B5' Bonus T Part 2 you will create an ati ficial intel ligence (AT agent to play the game. Then we will have an AI competition putting Here O represents a miss while X' represents a hit your AI against other students AI. You need to ask the user to input guesses in the form of “B5” or “b5” and say “hit or “miss”. Upon sinking a ship you need display “You sunk the Battleship”, or whichever ship was sunk, When the final ship has been sunk, you need to display “Game over, You Win!” In my example. I made a display grid with lines. You don't need to do this, You could simply initialize your guesses matrix with , and replace them with “X”s or “O”s as needed. Sample Run #1 board after the third guess:

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now