The assignment is to make a battle ship game. I Must use two 2D arrays to act as each player’s board. 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)
“h” for hard mode (7 x 7 program board size)
Must use at least 4 pre-populated player boards per level (aka there should be 4 player 1 and player 2 board combinations that you manually develop)
Must use random number generator (to randomly choose populated game board for each player)
Must refresh terminal screen after each player’s move
Must display “*” on every location on both player’s board at the start of each game.
Must display a “X” on every “Hit” made by the player on each player’s board. Must accept user input for Row & Column combination(s)
*I understand all of the topics, I am just having a hard time putting all of this together. A sample or example that I could help guide me through this challenge extra credit assignment would be most helpful!
Initialize boards
Get User 1 name
Get User 2 name
while playing
Get User's move
Validate User's move
Mark User's move
Was the User's move a hit?
Mark Hit
else
Mark Miss
Is the enemy sunk?
Show the winner
else
Switch to the next user
done