Question
JAVA LANGUAE ONLY! You are to create the framework for a Battleship game. You need to create a 5x5 grid that represents the gameboard. +
JAVA LANGUAE ONLY!
You are to create the framework for a Battleship game. You need to create a 5x5 grid that represents the gameboard. "+" signs represent spaces that haven't been bombed. "O" represents spaces that have been bombed, but nothing was hit. "X" represents spaces where the player has bombed and hit something.
For example:
+++++
++++O
+++X+
+++X+
+++++
The user will enter a grid space by entering two integers that represent the X and the Y coordinates on the grid.
You will create a battleship that class that represents the ship. It will contain the data about it's own hits and will know when all of it's spaces have been hit and it is sunk.
JAVA LANGAUGE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started