Question: Battleship games must include: -Function -Array -Random number generator -Loop - Branching Program Requirements 1.Must use at least 2 functions 2.Must use two 2D arrays

Battleship games

must include:

-Function

-Array

-Random number generator

-Loop - Branching

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 (similar to minesweeper):

"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)

6.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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!