Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Battleship game (Build from Scratch) 2 person game.Each person has a fleet of three ships (Battleship, Submarine, and Destroyer). This program will...

Battleship game (Build from Scratch)

2 person game.Each person has a fleet of three ships (Battleship, Submarine, and Destroyer).

This program will include:

-   Function

-   Array

-   Random number generator

-   Loop - Branching

Creative Liberties:

-   How hits are displayed

-   Display of the board

-   Number of Boards stored 

-   Locations and sizes of ships

-   Directions for the user 

Program Requirements

1.     Must use at least 2 functions 

2.     Must use two 2D arrays to act as each player's board. 

3.     The user must be able to choose their difficulty level:

"e" for easy mode (5 x 5 program board size)

"m" for medium mode (6 x 6 program board size) *as shown*  

"h" for hard mode (7 x 7 program board size)

4.     Must use at least 3 pre-populated player boards per level (aka there should be 3 player 1 and player 2 board combinations that you manually develop) 

5.     Must use random number generator (to randomly choose populated game board for each player) 

 Must refresh terminal screen after each player's move

7.     Must display "*" on every location on both player's board at the start of each game. 

8.     Must display a symbol (i.e. "X") on every "Hit" made by the player on each player's board. 

9.     Must accept user input for Row & Column combination(s)

10.    Must comment code and compile program in Linux 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question