Question: CSC 2 1 0 Program 3 ( Course Project ) Zero to 1 0 0 ! In c + + Rules: - Game will consist

CSC 210
Program 3(Course Project)
Zero to 100!
In c++
Rules:
- Game will consist of 3 players (User, CPU1, and CPU2)
- Each player starts with a score of zero and must capture spaces on the board to reach 100.
- Each turn a player will select 3 new spaces on the board. These spaces are revealed and captured meaning they can no longer be selected.
- The sum of the spaces captured are calculated and added to the player's score.
- The first player to reach 100 wins!
Board:
- The board will start with all '*' symbols which indicate available spaces.
- Spaces captured should reveal the number at that space.
- Numbers are assigned to each space on the board ranging from 1-9.
- Each round of player moves the board will display the sum, max, and spaces remaining using spaces not captured by a player. (This will change after each round)
- The dimensions of the board will be determined based on the number of numbers provided in the text file. Examples - A file with 25 numbers should create a \(5\times 5\) board. A file with 100 numbers should create a 1010 board. (I recommend using at least a 1010 board for better testing) Program should include the following:
- Implement encapsulation, abstraction, inheritance, and polymorphism.
- Program must include the provided Board class.
- All created classes must be in separate header and implementation files.
- Documentation explaining how your program works.
Submit all .h and .cpp files with your code and comments. Players / Standard Moves:
- Player1(User)- Player1 will capture spaces on the board via input.
```
Enter a row: 8
Enter a column: 0
Enter a row: 1
Enter a column: 1
Enter a row: 2
Enter a column: 2
```
- Player2(CPU1)- Player2 will capture spaces on the board randomly.
- Player3(CPU2)- Player3 will capture spaces on the board by selecting the earliest available spaces on the board.
- For example: spaces labeled blue are captured by Player3. Spaces labeled gray were spaces already captured. Player3 will always select the earliest spaces available on the board and skip spaces already captured.
Bonus Points For Player Moves:
- Players will receive bonus points based on the numbers captured each turn.
- If a player captures duplicates of a number their total sum that turn is doubled
- If a player captures numbers that increase or decrease in the order selected, their total sum that turn is doubled.
- For example:
- If the numbers in order captured are 1,2, and 4 this would be a sequence bonus.
- If the numbers in order captured are 7,6, and 3 this would also be a sequence bonus.
- If the numbers captured are 5,9, and 5 this would be a duplicate bonus.
```
Frank Numbers Selected: 311
Numbers Match!! Points 2x
CPUl Numbers Selected: 983
Numbers Decrease Sequentially!! Points 2x
CPU2 Numbers Selected: 176
No Bonus This Turn
``` Special Moves:
- Each player will have a special ability to capture multiple spaces at once. Bonuses will not be applied when using a special.
- Each player will have 1 special for the game.
- Each player will have the following specials:
- Player1- Scatter, Precision, and Linear
- Player2- Random Scatter
- Will use their special if their score is less than \(\mathbf{50.}\)
- Player3- Random Precision
- Will use their special if their score is greater than \(\mathbf{50.}\)
Scatter:
- Capture 10 random locations on the board.
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 \(3\times 3\) area.
- Random Precision will randomly select the center point as well as the area size. The random area size will also be \(3\times 3\).
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 capture up to 10 spaces between the selected points.
- In some situations, duplicate spaces will be selected but should be ignored.
- If the path is less than 10 spaces total, assume the entire path will be captured.
- See video in Canvas for examples. Program should include the following:
- Implement encapsulation, abstraction, inheritance, and polymorphism.
- Program must include the provided Board class.
- All created classes must be in separate header and implementation files.
- Documentation explaining how your program works.
Submit all .h and .cpp files with your code and comments. ```
#ifndef BOARD_H_INCLUDED
#define BOARD_H_-_INCLUDED
#include
#include
#include
using namespace std;
class Board
{
private:
//2D array board
int **board;
//2D array used to indicate if a space has been selected during
the game
bool **spaceSelected;
// Used to store game numbers
vector numbers;
// Number of rows for board
int rows;
// Number of columns for board
int cols;
public:
/**
* Constructor
* Initializes board dimensions and numbers
*/
Board(string fileName);
/**
* Display Game Banner
**/
void displayGa
CSC 2 1 0 Program 3 ( Course Project ) Zero to 1

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!