Unformatted text preview: which the player stamped at every turn. nTurns is the length of the turnR and turnC arrays. void IGame(bool arr, int turnR, int turnC, int n, int
nTurns); In this function, you will simulate a game in which the user plays with an I shaped stamp that looks something like this: So, if you were to stamp at row 3 and column 5, then the center of the stamp would be placed on that location, and all of the following squares would be toggled: (3,5) (2,5) (2,4) (2,6) (4,5) (4,4) (4,6) Of course, if some parts of the stamp were to go off the board, then the number of squares toggled might be less, since the stamp wont be entirely touching the board. For example, if you were to stamp at row 1 and column 1, the following squares would be toggled: (1,1) (2,1) (2,2) void KGame(bool arr, int turnR, int turnC, int n, int
nTurns); This game is identical to the last one, except that the shape of the stamp is different. The stamp you will play with in this game is K shaped, like so: Task 8 – Matrix Arithmetic 2 (Hacker’s Edition) float matrixDet(float mat, int n); This function takes in as input an array that represents an nxn square matrix, and computes and returns the determinant of that matrix. To calculate the determinant of a matrix, please see the following link: http://people.richland.edu/james/le...
View
Full Document
 Winter '11
 FareedZaffar
 Derivative, Array, Tuple

Click to edit the document details