Without Arrays, Vectors, or Objects ONE row 16 column battle ship game. | _ | _
ID: 3561992 • Letter: W
Question
Without Arrays, Vectors, or Objects
ONE row 16 column battle ship game. | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
Player needs the ability to insert a boat3 (three squares), boat2 (two squares) and a boat1 (one square) into the row and then attempt to sink the computers three ships before the computer sinks your three ships.
Game should tell player whether their guess Missed, Hit or Hit and Sunk a ship.
The computer's ship placement is random and that you can actually play the game to a win or loss.
Explanation / Answer
Battleship.java
Java Code:
Board.java
Java Code:
Ship.java
Java Code:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.