public Set<Coordinate> getLegalMoves(Coordinate startingCoord, Board board) {
		Set<Coordinate> legalMoves = new LinkedHashSet<Coordinate>();
		Set<Coordinate> possibleMoves = possibleMoves(startingCoord);
		Set<Coordinate> threatenedSquares = board.findThreatenedSquares(color);
		for (Coordinate endCoord : possibleMoves) {
			if (!board.contains(endCoord))
				continue;
			Piece endPiece = board.getPiece(endCoord);
			if (endPiece.isNone() && !threatenedSquares.contains(endCoord))
				legalMoves.add(endCoord);
			else if (!endPiece.isNone() && 
					 endPiece.getColor() != color &&
					 !threatenedSquares.contains(endCoord))
				legalMoves.add(endCoord);
				
			/*Board copyBoard = board.deepCopy(board);
			if (copyBoard.execute(new Move(startingCoord, endCoord)) && 
				!copyBoard.isInCheck(copyBoard.getCurrentTurnColor()))
				legalMoves.add(endCoord);*/
		}
		return legalMoves;
	}