package com.livingworld.modules;

import com.livingworld.regions.Region;

/**
 * Minimal context passed to modules during a region update call.
 *
 * <p>This is a placeholder class for Milestone 8. It provides access to the
 * region being updated and can be extended later with additional information
 * such as time service, profiler data, or event bus references.</p>
 */
public final class RegionUpdateContext {

    private final Region region;

    /**
     * Creates a new RegionUpdateContext for the given region.
     *
     * @param region the region being updated (must not be null)
     * @throws IllegalArgumentException if region is null
     */
    public RegionUpdateContext(Region region) {
        if (region == null) {
            throw new IllegalArgumentException("region must not be null");
        }
        this.region = region;
    }

    /**
     * Returns the region being updated.
     *
     * @return the region (never null)
     */
    public Region getRegion() {
        return region;
    }
}