Think long and hard about this question and only

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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

This homework help was uploaded on 03/02/2014 for the course CS 200 taught by Professor Fareedzaffar during the Winter '11 term at Lahore University of Management Sciences.

Ask a homework question - tutors are online