Question: CSC 2 1 0 Program 3 ( Course Project ) CSC Forts! The user will compete against the CPU to conquer forts from their board.

CSC 210
Program 3(Course Project)
CSC Forts!
The user will compete against the CPU to conquer forts from their board. Each player will start with a board containing forts. Each player will start with the same number of forts. Each player will select positions on the opposing players board. To win the user must conquer enough forts to decrease the opposing players count to 0.
Board:
The board will use numbers to indicate the locations of the forts.
The forts will be hidden during the game.
When a board is conquered by the opponent it will be marked with a 0. Other conquered spots will be marked with x.
The number of forts as well as the dimensions of the board will be determined via input prior to start.
Players:
The game will consist of the 3 available players:
Player1(User)
Player2(CPU) Aggressive player
Player3(CPU) Tactical player
The games will be 1 vs 1, and the user or Player1 may select either Player2 or Player3 for the game.
Each player will be able to select a location from the opposing players board or use a special to select multiple locations at one time.
Standard Moves:
Player1 can select a position from the CPUs board via input.
CPU players, Player 2 and 3, will select a position from your board randomly. Ensure a new position is selected each time.
Special Moves:
Each player will have a special ability to conquer multiple positions at once.
The number of specials a player may use per game will be determined at the start via input.
Each time a player uses a special, their fort count will decrease by 1. A player may not use a special if their fort count is 1.
Important: Decreasing the fort count will not remove a fort from the board.
Each player will have the following specials:
Player1 Scatter, Precision, and Linear
Player2 Random Scatter
Will use a special until their fort count is 1.
Player3 Random Precision
Will use a special when their fort count is less than their opponents fort count.
Scatter:
Conquer 10 random locations on the board.
Random Scatter will conquer a random number of locations based on the board size.
For example: if the board is 5x5 Random Scatter can conquer as many as 25 locations at once.
Precision:
Conquer positions on the board based on a starting location. The user will provide a location as the center point for the special. The special will conquer adjacent spaces based on a 5x5 area.
Random Precision will randomly select the center point as well as the area size. The random area size will be either 3x3,5x5, or 7x7.
Linear:
Conquer spaces using a horizontal, vertical, or diagonal strike.
The user will select a starting and ending point for the strike.
The special will conquer up to 10 spaces between the selected points.
In some situations, duplicate spaces may be selected when using this special.
If the path is less than 10 spaces total, assume the entire path will be conquered.
The following formulas are used to determine the linear path:
Determine the slope of the path:
Xslope =(startX endX)/10
Yslope =(startY endY)/10
Apply the slope to the starting point repeatedly to reach the ending point:
X = currentX Xslope
Y = currentY - Yslope
How to Play:
Each player will take turns conquering positions from each players board. The user will be able to select a standard move or a special each turn. The user may only use a special if their fort count is more than 1. The first player to reduce the other players fort count to 0 wins.
Submission:
Program should include the following:
Implement encapsulation, abstraction, inheritance, and polymorphism.
All created classes must be in separate header and implementation files.
Documentation explaining how your program works.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!