21 lines
572 B
C#
21 lines
572 B
C#
|
|
namespace Chessistics.Engine.Model;
|
||
|
|
|
||
|
|
public class DemandState
|
||
|
|
{
|
||
|
|
public DemandDef Definition { get; }
|
||
|
|
public int ReceivedCount { get; set; }
|
||
|
|
|
||
|
|
public DemandState(DemandDef definition)
|
||
|
|
{
|
||
|
|
Definition = definition;
|
||
|
|
ReceivedCount = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
public bool IsSatisfied => ReceivedCount >= Definition.Amount;
|
||
|
|
public Coords Position => Definition.Position;
|
||
|
|
public string Name => Definition.Name;
|
||
|
|
public CargoType Cargo => Definition.Cargo;
|
||
|
|
public int Required => Definition.Amount;
|
||
|
|
public int Deadline => Definition.Deadline;
|
||
|
|
}
|