public void checkLineOfSight(ChessPosition start, ChessPosition end)
	  throws IllegalMove { 
			ChessGame g = getGame();
			ChessBoard b = g.getBoard();
			int dx = 0;
			int dy = 0;
			
			if (start.getY() > end.getY()) {
				dy = -1;
			}
			
			if (start.getY() < end.getY()) {
				dy = 1;
			}
			if (start.getX() > end.getX()) {
				dx = -1;
			}
			
			if (start.getX() < end.getX()) {
				dx = 1;
			}
			if (dx != 0 && dy !=0) {
				if (!(Math.abs(end.getX() - start.getX()) == Math.abs(end.getY()
						- start.getY()))) {
					throw new IllegalMove(this, start, end);
				}
			}
			ChessPosition cp = new ChessPosition((start.getX() + dx),
					(start.getY() + dy));
			
			while (!(cp.equals(end))) {
				if (b.getPieceAt(cp) != null)
					throw new IllegalMove(this, start, end);
				else
					cp = new ChessPosition((cp.getX() + dx), (cp.getY() + dy));
			}
	  }