Update Season ctor

This commit is contained in:
Tim Van Baak 2024-08-12 15:27:20 -07:00
parent b17ce9485a
commit 27ffaccd20
1 changed files with 5 additions and 5 deletions

View File

@ -49,9 +49,9 @@ public class Season
[JsonIgnore] [JsonIgnore]
private TimelineFactory Timelines { get; } private TimelineFactory Timelines { get; }
private Season(Season? past, int turn, string timeline, TimelineFactory factory) private Season(string? past, int turn, string timeline, TimelineFactory factory)
{ {
this.Past = past?.ToString(); this.Past = past;
this.Turn = turn; this.Turn = turn;
this.Timeline = timeline; this.Timeline = timeline;
this.Timelines = factory; this.Timelines = factory;
@ -64,7 +64,7 @@ public class Season
/// </summary> /// </summary>
public static Season MakeRoot() public static Season MakeRoot()
{ {
TimelineFactory factory = new TimelineFactory(); TimelineFactory factory = new();
return new Season( return new Season(
past: null, past: null,
turn: FIRST_TURN, turn: FIRST_TURN,
@ -76,11 +76,11 @@ public class Season
/// Create a season immediately after this one in the same timeline. /// Create a season immediately after this one in the same timeline.
/// </summary> /// </summary>
public Season MakeNext() public Season MakeNext()
=> new(this, Turn + 1, Timeline, Timelines); => new(this.Designation, Turn + 1, Timeline, Timelines);
/// <summary> /// <summary>
/// Create a season immediately after this one in a new timeline. /// Create a season immediately after this one in a new timeline.
/// </summary> /// </summary>
public Season MakeFork() public Season MakeFork()
=> new(this, Turn + 1, Timelines.NextTimeline(), Timelines); => new(this.Designation, Turn + 1, Timelines.NextTimeline(), Timelines);
} }