using System.Text.Json.Serialization;
namespace MultiversalDiplomacy.Model;
///
/// Represents a state of the map produced by a set of move orders on a previous season.
///
public class Season(string? past, int turn, string timeline)
{
///
/// The first turn number. This is defined to reduce confusion about whether the first turn is 0 or 1.
///
public const int FIRST_TURN = 0;
///
/// The designation of the season immediately preceding this season.
/// If this season is an alternate timeline root, the past is from the origin timeline.
/// The initial season does not have a past.
///
public string? Past { get; } = past;
///
/// The current turn, beginning at 0. Each season (spring and fall) is one turn.
/// Phases that only occur after the fall phase occur when Turn % 2 == 1.
/// The current year is (Turn / 2) + 1901.
///
public int Turn { get; } = turn;
///
/// The timeline to which this season belongs.
///
public string Timeline { get; } = timeline;
///
/// The multiversal designation of this season.
///
[JsonIgnore]
public string Key => $"{this.Timeline}{this.Turn}";
public override string ToString() => Key;
}