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
Program 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
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 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 available players:
PlayerUser
PlayerCPU Aggressive player
PlayerCPU Tactical player
The games will be vs and the user or Player may select either Player or Player 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:
Player can select a position from the CPUs board via input.
CPU players, Player and 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 A player may not use a special if their fort count is
Important: Decreasing the fort count will not remove a fort from the board.
Each player will have the following specials:
Player Scatter, Precision, and Linear
Player Random Scatter
Will use a special until their fort count is
Player Random Precision
Will use a special when their fort count is less than their opponents fort count.
Scatter:
Conquer 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 x Random Scatter can conquer as many as 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 x area.
Random Precision will randomly select the center point as well as the area size. The random area size will be either xx or x
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 spaces between the selected points.
In some situations, duplicate spaces may be selected when using this special.
If the path is less than 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
Yslope startY endY
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 The first player to reduce the other players fort count to 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
