Started the assignment one for CS396

+- assignmentOne/wordcounter.cpp
+- assignmentOne/maze.cpp
+- assignmentOne/go_fish.cpp
+- assignmentOne/battleship.cpp
This commit is contained in:
Charles Descamps 2024-09-04 15:03:03 -07:00
parent 8c738f9374
commit c8b785fcb8
4 changed files with 180 additions and 0 deletions

View file

@ -0,0 +1,53 @@
/*
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;
}