+- assignmentOne/wordcounter.cpp +- assignmentOne/maze.cpp +- assignmentOne/go_fish.cpp +- assignmentOne/battleship.cpp
53 lines
No EOL
1.9 KiB
C++
53 lines
No EOL
1.9 KiB
C++
/*
|
||
Program Name: Battleship (Extra Credit Assignment)
|
||
Process: Does the following according to spec:
|
||
In this program, you will be recreating the game Battleship with a 5x5 gameboard grid and randomly
|
||
placing 5 ships on the board
|
||
Your game must do the following:
|
||
● Every round, you must display two gameboards
|
||
○ Target Gameboard
|
||
■ This gameboard is to display the attempts the user has made against the
|
||
computer.
|
||
○ Ocean Gameboard
|
||
■ This board is to display where the user has placed their ships and the computer’s
|
||
attempts against the user.
|
||
● Optional Key for the gameboard:
|
||
○ X = Hit
|
||
○ O = Miss
|
||
○ + = One Ship
|
||
○ . = Empty/Unknown territory.
|
||
● The computer will place their ships randomly on their ocean gameboard grid meanwhile the user
|
||
will be able to input where they want to place their ships by using coordinates.
|
||
● Every round, the user will enter their coordinates and the program will display if it was a hit.
|
||
After the user’s turn, the computer will state their coordinates and the program will display if it
|
||
was a hit. After each round, the gameboard will display updated information.
|
||
● The game is over when someone knocks down all of their opponent’s ships.
|
||
Function Input/Parameters: ???
|
||
Function Output/Parameters: ???
|
||
Function Output/Returned: ???
|
||
Device Input/Device: ???
|
||
Device Output/Monitor: ???
|
||
Dependencies: ???
|
||
*/
|
||
|
||
#include <cstdio>
|
||
#include <cstdlib>
|
||
#include <iostream>
|
||
#include <cstring>
|
||
#include <list>
|
||
#include <set>
|
||
#include <unordered_map>
|
||
#include <time.h>
|
||
|
||
using namespace std;
|
||
|
||
// function prototypes
|
||
|
||
// class definitions
|
||
|
||
// main program
|
||
int main(int argc, char **argv)
|
||
{
|
||
// return 0
|
||
return 0;
|
||
} |