Do part B following the steps in c++
Overview In this assignment, you will simulate a simple board game. The board is a grid, and starts with a pile of money in each cell. Players take turns rolling four dice to pick a cell, and then taking the money from there. If the cell is rolled again, the money will already be gone. The program will be divided into a main function and three supporting modules. A C++ module is a combination of a header (..) file and a source (.cpp) file with the same base file name, e.g., Dice.h and Dice.cpp. A test program will be provided for each module. When the game runs, it will print out the board, the numbers rolled and the cell hit, and how much money the player receives. Then, the player will have the chance to quit the game. If he/she doesn't, the process will be repeated for the next player. The main purpose of this assignment is to give you practice using two-dimensional arrays, including passing two-dimensional arrays to functions. For Part A, you will add constants and functions relating to the size of the game board. For Part B, you will add functions to handle the game board itself. For Part C, you will add constants and functions related to simulated dice. For Part D, you will use the constants and functions from Parts A, B, and C to write the game program. Then, for Part E. you will improve the display of the game board. Another purpose of this assignment is to familiarize you with multi-file programs. To keep the assignment from getting to be too long, the files are small and the functions are mostly short. Many functions only contain a single line of code. Warning: The test programs used in this course sometimes capture and tests the output from the cout buffer. Therefore, you must use cout to print your output. If you print it in some other way, (e.g. using print for cerr), the test program will not see it. Then you will get a mark of zero for that portion of the assignment. The Game Board The game board will be represented as a 2-dimensional array. It is 7 x 7 cells in size. The elements of the array will store the amount of money in the different grid cells. The grid rows will be named using the uppercase) letters 'A' to 'G', and the grid columns will be named using the digits 'O' to '6'. Thus, each cell will have a unique name such as A2 (row 0, column 2) or E6 (row 4, column 6). The cells on the board will start with more or less money depending on how close they are to the center. Specifically, the cells on the edge will each have $1, the next row of cells inside them will each have $2, then $3, and the center cell will have $4. At game start, the board will look as follows: $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $2 $2 $2 $ 2 $2 $1 $2 $3 $3 $3 $2 $1 $2 $3 $4 $3 $2 $1 $2 $3 $3 $3 $2 $1 $2 $2 $2 $2 $2 $1 $1 $1 $1 $1 $1 $1 In Part B, you will create functions related to the board itself. Put the function prototypes in a file named Board.h and the function implementations in a file named Board.cpp By the end of Part B, you will have functions with the following prototypes: void boardinit (Board board): int boardGetAt (const Board board, int row, int column); void boardsetAt (Board board, int row, int column, int value); void boardprint (const Board board); In Part E, you will add helper functions with the following prototypes: void boardprintColumnNameRow (); void boardPrintBorder Row (); void boardprintEmptyRow 0); void boardprintDataRow (const Board board, int row): Perform the following steps: 1. In Board.cpp, use #include to include the
library, "BoardSize.h", and "Board.h". Remember to put using namespace std;. 2. In Board.h, use typedef to define a Board type corresponding to a 2D array of ints with dimensions BOARD_SIZE and BOARD_SIZE. The typedef uses the BOARD_SIZE constant, so Board.h should tinclude "BoardSize.h". 3. In Board. h, copy in the function prototypes shown above. 4. In Board.cpp, add an implementation for the boardinit function that sets all the elements of the array. The values should depend on the array position, as described in The Game Board above. You must use at least two loops in the implementation Hint: Use a pair of nested for loops for the initialization Hint: Start by initializing all the elements of the board to the same value, such as 1. Then, after that works, change your function to set them to the correct values. Hint: The abs function from the