///////
//
// Student: Russell Lowke
//     T.F: Francis Crick
// Unit Five, pencil-and-paper - question 3 [worth 2pts],  7/16/2002
//
//  checkerboard represented by 8x8 array of bool values
//  board[row][column]    is occupied
//  write code to find if any other squares in same row or column are occupied
//  also write declaration for the board.


const int BOARDSIZE = 8;
bool board[BOARDSIZE][BOARDSIZE];

bool checkRow(int row, int column)
{	
	for (int i = 0; i < BOARDSIZE; i++) {
		if ( board[row][i] && (i <> column) )  {
			return true;		// yes, row occupied
		}
	}
	
	return false;
}

bool checkColumn(int row, int column)
{	
	for (int i = 0; i < BOARDSIZE; i++) {
		if ( board[i][column] && (i <> row) ) {
			return true;		// yes, column occupied
		}
	}
	
	return false;
}