private string ConstructIntelText(IntelLevel intelLevel, GameTimePeriod intelAge) { string intelMsg = intelLevel.GetValueName(); switch (intelLevel) { case IntelLevel.Unknown: case IntelLevel.LongRangeSensors: case IntelLevel.ShortRangeSensors: case IntelLevel.Complete: // no data to add break; case IntelLevel.OutOfDate: string addendum = String.Format(". Last Intel {0} days ago.", intelAge.FormattedPeriod); intelMsg = intelMsg + addendum; break; case IntelLevel.Nil: default: throw new NotImplementedException(ErrorMessages.UnanticipatedSwitchValue.Inject(intelLevel)); } return intelMsg; }
public ColoredTextList_Intel(IGameDate exploredDate, IntelLevel intelLevel) { GameTimePeriod intelAge = new GameTimePeriod(exploredDate, GameTime.Date); string intelText_formatted = ConstructIntelText(intelLevel, intelAge); _list.Add(new ColoredText(intelText_formatted)); }