Can you solve this? C++ compiler

Assignment #8

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Problem Solving and Programming in C++

Department of Computer Science

Old Dominion University

Objective: The main objective of this assignment is to prepare students for the final project. The students will need to implement a program that involves multiple ADTs, communication among them, and a graphics grid.
Description:
You must implement a simple game that involves finding hidden items in a 15×15 2D grid. The grid consists of squares whose values is initially hidden. A square is either holding a hidden item, (marked with an ‘X’) or nothing at all (marked with empty char ‘ ‘), but until the square is revealed (lit by a flashlight controlled by the user), only a ‘@’ is displayed instead of the actual value. The player can reveal any square by moving the flashlight on top of it. The flashlight reveals the value of the square it is lighting, and in the figure below shows an empty square. When the flashlight is pointing at a square, the square is encircled by a boundary as seen below. Note that the borders that are drawn around the square should not hide an ‘X’ (see Figure 1). Once an ‘X’ has been identified, the square permanently displays its contents, regardless of whether the flashlight is still pointing there or not.

Figure 1. Border Placement in the presence of ‘X’

You must implement this game, all the while allowing the user to determine how many ‘X’ to place on the grid (1-25) and how many turns to allow the user to find them all (1-50).

TASK 1

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Create at least three ADTs, Square, Board and Player. While you are free to implement these in any manner you deem fit, there are some requirements/restrictions for the ADT attributes and methods.
Square: This ADT is the building block of the board.
1. Boolean to represent whether a square is lit or not
2. A character to represent the value of the square:
Board
1. Private 2D array of Squares to represent the grid
2. A constructor that automatically places the ‘X’ on the grid in a random manner
3. Two attributes to signify which square the flashlight is pointing at (row, column)
4. Print the contents of the grid (no need to hide with ‘@’ at this point, just print ‘X’ or ‘ ‘ for each square)
Player:
1. A function to determine where the flashlight is to be moved (control with the keys: a,w,d,s)
2. A pointer variable of type Board, used to interact with the board as the 2D grid array must be private
Create a function to prompt the user for the parameters (number of turns and number of hidden items)
Note: While not a requirement, you are encouraged to use a Referee ADT. Watch the Project Video Tutorial for ideas on how to utilize such an ADT.

TASK 2

Implement a new Printing function that will take into consideration whether a square is lit or not and where the flashlight is point at. At the bottom print the current flashlight position, the number of ‘X’ found out of the total number, and the turn number.

TASK 3

Create a function that allows the flashlight to be moved and reveal the value of squares it is pointing at. Make sure that any discovered ‘X’, continue to print once the flashlight has been moved to another square.

Figure 2. Flashlight pointing to the right of a revealed ‘X’
Figure 3. Flashlight Pointing to ‘X’

Figure 4. Pointing at square farther away from the revealed ‘X’

Grading Rubric
Total Points: 100
Points Allotted:
· Compilation 30
· Included ADTs in separate files 10
· Appropriate Public and Private sections 10
· Properly random ‘X’ positions 10
· Flashlight Movement 10
· Revealed ‘X’ are permanently displayed 20
· Comments and Indentation 10
Submission notes:
· Zip the entire Code::Blocks project containing all the .cpp, .h, .cbp files name the zipped file “Assg8_cslogin.zip”, where the cslogin is your login ID for the computers at the Department of Computer Science at ODU.
· Submit the zipped file using the appropriate Blackboard link.

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.

Order your essay today and save 30% with the discount code ESSAYHELP