public boolean kingIsInCheck(int color) {

		boolean check = false;
		int y = kingPositions[color].y;
		int x = kingPositions[color].x;

		for (int i = 0; i < 8; i++) {
			for (int j = 0; j < 8; j++) {

				if (chessBoard[i][j].color != color && !(chessBoard[i][j] instanceof Empty)) {
					if (chessBoard[i][j].isLegalCapturingMove(y, x)) {
						check = true;
						for (Coordinate c : chessBoard[i][j].getPath(y, x)) {
							if (!(chessBoard[c.y][c.x] instanceof Empty)) {
								check = false;
							}
						}
						if (check) {
							return check;
						}
					}
				}
			}
		}
		return check;

	}