Skip to content

Game.Simulation.ILandValueCell

Assembly:
(unknown)

Namespace: Game.Simulation

Type: interface

Base: n/a (interface)

Summary:
Represents a single land-value cell used by the simulation. The interface exposes a single operation to add a floating-point delta to the cell's stored land value. Implementations are expected to accumulate or apply value deltas (positive or negative) as part of land value propagation or update passes in the simulation.


Fields

  • None.
    No backing fields are defined by the interface itself; concrete implementations will manage their own storage.

Properties

  • None.
    The interface does not declare any properties.

Constructors

  • None.
    Interfaces do not declare constructors. Concrete implementations provide initialization as needed.

Methods

  • void Add(float amount)
    Adds the given amount to the cell's land value. The amount can be positive (increase) or negative (decrease). Implementations decide how the value is stored, clamped, or otherwise handled.

Usage Example

// Simple implementation of ILandValueCell
public class LandValueCell : ILandValueCell
{
    private float _value;

    public void Add(float amount)
    {
        _value += amount;
        // Optionally clamp or apply other logic:
        // _value = Mathf.Clamp(_value, minValue, maxValue);
    }

    public float GetValue() => _value;
}

// Example usage in a simulation update
var cell = new LandValueCell();
cell.Add(2.5f);   // increase land value
cell.Add(-1.0f);  // decrease land value