1.Play Battle Ship on a 4x4 grid 2.Place two ships (size 3 and 2) randomly 3.cho
ID: 3625239 • Letter: 1
Question
1.Play Battle Ship on a 4x4 grid2.Place two ships (size 3 and 2) randomly
3.choice to be first or second player
4.graphical display of the board
5.intuitive way to place moves using position numbers below. Program must verify user move (input) is correct before placing the move (attack).
6.Each program is responsible for checking the desired moves of the opponent. If opponent makes an illegal move, message should display the illegal move. It is you program’s job to recognize that it is an illegal move and state as such. If your program makes an illegal move and is caught by the opponent program, then it will result in a loss. If your program incorrectly state that opponent made an illegal move, then you forfeit the game.
7.after each game, determine and display the winner
8.after the match (two games), display game score
9.If the statistics of points and such is incorrectly displayed, then it will count as a loss.
10.If a player gets a hit, they are allowed to take another shot. Even if the player gets another hit, their turn is done
Positions are as follows
0,0 0,1 0,2 0,3
1,0 1,1 1,2 1,3
2,0 2,1 2,2 2,3
3,0 3,1 3,2 3,3
Please help I am lost as to where even to start
Explanation / Answer
//Here you go, it should work fine now with all the functions implemented #include #include using namespace std; void resetBoard(char board[4][4]); void displayBoard(char board[4][4]); void setBoard(char board[4][4]); void playGame(char board[4][4]); void computerPlay(char board[4][4]); bool checkGameOver(char board[4][4]); int countScore(char board[4][4]); int offerChoice(); int main (void) { int choice; srand ( time(NULL) ); char firstBoard[4][4]; char secondBoard[4][4]; resetBoard(firstBoard); resetBoard(secondBoard); setBoard(firstBoard); setBoard(secondBoard); choice=offerChoice(); coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.