public Rectangle computeBound()
  {
    int minX = Integer.MAX_VALUE, maxX = 0;
    int minY = Integer.MAX_VALUE, maxY = 0;
    
    for (Level l : levels)
    {
      for (Piece p : l)
      {
        minX = Math.min(p.x, minX);
        minY = Math.min(p.y, minY);
        
        maxX = Math.max(p.x + p.type.width*2, maxX);
        maxY = Math.max(p.y + p.type.height*2, maxY);
      }
    }
    
    if (minX % 2 == 1) --minX;
    if (minY % 2 == 1) --minY;
    if (maxX % 2 == 1) ++maxX;
    if (maxY % 2 == 1) ++maxY;
    
    return new Rectangle(minX/2, minY/2, maxX/2, maxY/2);
  }