AdvanceTimeline key to string
This commit is contained in:
parent
9185534f70
commit
64f48064fc
|
@ -13,7 +13,7 @@ public class MovementDecisions
|
||||||
public Dictionary<MoveOrder, DefendStrength> DefendStrength { get; }
|
public Dictionary<MoveOrder, DefendStrength> DefendStrength { get; }
|
||||||
public Dictionary<MoveOrder, PreventStrength> PreventStrength { get; }
|
public Dictionary<MoveOrder, PreventStrength> PreventStrength { get; }
|
||||||
public Dictionary<MoveOrder, DoesMove> DoesMove { get; }
|
public Dictionary<MoveOrder, DoesMove> DoesMove { get; }
|
||||||
public Dictionary<Season, AdvanceTimeline> AdvanceTimeline { get; }
|
public Dictionary<string, AdvanceTimeline> AdvanceTimeline { get; }
|
||||||
|
|
||||||
public IEnumerable<AdjudicationDecision> Values =>
|
public IEnumerable<AdjudicationDecision> Values =>
|
||||||
IsDislodged.Values.Cast<AdjudicationDecision>()
|
IsDislodged.Values.Cast<AdjudicationDecision>()
|
||||||
|
@ -47,7 +47,7 @@ public class MovementDecisions
|
||||||
var submittedOrdersBySeason = orders.Cast<UnitOrder>().ToLookup(order => order.Unit.Season);
|
var submittedOrdersBySeason = orders.Cast<UnitOrder>().ToLookup(order => order.Unit.Season);
|
||||||
foreach (var group in submittedOrdersBySeason)
|
foreach (var group in submittedOrdersBySeason)
|
||||||
{
|
{
|
||||||
AdvanceTimeline[group.Key] = new(group.Key, group);
|
AdvanceTimeline[group.Key.Designation] = new(group.Key, group);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create timeline decisions for each season potentially affected by the submitted orders.
|
// Create timeline decisions for each season potentially affected by the submitted orders.
|
||||||
|
@ -60,27 +60,27 @@ public class MovementDecisions
|
||||||
{
|
{
|
||||||
case MoveOrder move:
|
case MoveOrder move:
|
||||||
AdvanceTimeline.Ensure(
|
AdvanceTimeline.Ensure(
|
||||||
world.Seasons[move.Season],
|
move.Season,
|
||||||
() => new(world.Seasons[move.Season], world.OrderHistory[move.Season].Orders));
|
() => new(world.Seasons[move.Season], world.OrderHistory[move.Season].Orders));
|
||||||
AdvanceTimeline[world.Seasons[move.Season]].Orders.Add(move);
|
AdvanceTimeline[move.Season].Orders.Add(move);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SupportHoldOrder supportHold:
|
case SupportHoldOrder supportHold:
|
||||||
AdvanceTimeline.Ensure(
|
AdvanceTimeline.Ensure(
|
||||||
supportHold.Target.Season,
|
supportHold.Target.Season.Designation,
|
||||||
() => new(supportHold.Target.Season, world.OrderHistory[supportHold.Target.Season.Designation].Orders));
|
() => new(supportHold.Target.Season, world.OrderHistory[supportHold.Target.Season.Designation].Orders));
|
||||||
AdvanceTimeline[supportHold.Target.Season].Orders.Add(supportHold);
|
AdvanceTimeline[supportHold.Target.Season.Designation].Orders.Add(supportHold);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SupportMoveOrder supportMove:
|
case SupportMoveOrder supportMove:
|
||||||
AdvanceTimeline.Ensure(
|
AdvanceTimeline.Ensure(
|
||||||
supportMove.Target.Season,
|
supportMove.Target.Season.Designation,
|
||||||
() => new(supportMove.Target.Season, world.OrderHistory[supportMove.Target.Season.Designation].Orders));
|
() => new(supportMove.Target.Season, world.OrderHistory[supportMove.Target.Season.Designation].Orders));
|
||||||
AdvanceTimeline[supportMove.Target.Season].Orders.Add(supportMove);
|
AdvanceTimeline[supportMove.Target.Season.Designation].Orders.Add(supportMove);
|
||||||
AdvanceTimeline.Ensure(
|
AdvanceTimeline.Ensure(
|
||||||
supportMove.Season,
|
supportMove.Season.Designation,
|
||||||
() => new(supportMove.Season, world.OrderHistory[supportMove.Season.Designation].Orders));
|
() => new(supportMove.Season, world.OrderHistory[supportMove.Season.Designation].Orders));
|
||||||
AdvanceTimeline[supportMove.Season].Orders.Add(supportMove);
|
AdvanceTimeline[supportMove.Season.Designation].Orders.Add(supportMove);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue