@Override
    public void paintComponent(Graphics graphics) {
        Graphics2D graphics2D = (Graphics2D) graphics;
        graphics2D.translate(-camera.getLocation().getX(), -camera.getLocation().getY());
        for (Tile tile : getTiles(Layer.BACK)) {
            tile.render(graphics, Layer.BACK);
        }
        for (Tile tile : getTiles(Layer.BACK_TOP)) {
            tile.render(graphics, Layer.BACK_TOP);
        }
        for (Tile tile : getTiles(Layer.FRONT)) {
            tile.render(graphics, Layer.FRONT);
        }
        for (WorldObject object : objects) {
            if (object.getLocation().distanceSquared(camera.getLocation()) <= 640000) {
                object.render(graphics);
            }
        }
        graphics2D.translate(camera.getLocation().getX(), camera.getLocation().getY());
    }