private int countPieces(){
		
		int totalPieces = 0;

		for (int row = 0; row < 8; row++){
			for (int col = 0; col < 8; col++){
				if (theBoard[row][col] == 2 || theBoard[row][col] == -2 || theBoard[row][col] == 4 || theBoard[row][col] == -4)
					totalPieces++;
			}
		}
		return totalPieces;
	}