public GameWorld getPortion(int x, int y, int width, int height)throws IndexOutOfBoundsException {
        GameWorld result = null;
        
        int xmax = tiles.getMaxY();
        int ymax = tiles.getMaxY();
        
        if (x < 0 || y < 0 || x+width > xmax || y+height > ymax){
            throw new IndexOutOfBoundsException("WorldPortion out of World Range.");
        } else {
            TileList sublist = new TileList();
            Iterator it = tiles.entrySet().iterator();
            boolean outOfRange = false;
            while (it.hasNext() && !outOfRange) {
                Map.Entry pairs = (Map.Entry)it.next();
                sublist.put(pairs.getKey(), pairs.getValue());
                //System.out.println(pairs.getKey() + " = " + pairs.getValue());
                it.remove(); // avoids a ConcurrentModificationException
            }
        }
        
        return result;
    }