Example #1
0
 public bool HighlightInEdge(ResearchNode from)
 {
     foreach (var r1 in HighlightReasons())
     {
         foreach (var r2 in from.HighlightReasons())
         {
             if (Highlighting.Similar(r1, r2))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
 public bool Highlight(Highlighting.Reason r)
 {
     for (int i = 0; i < _reasons.Count(); ++i)
     {
         var p = _reasons[i];
         if (p.First == r)
         {
             if (!Highlighting.Stackable(r))
             {
                 return(false);
             }
             _reasons[i] =
                 new Pair <Highlighting.Reason, int>(r, p.Second + 1);
             return(true);
         }
     }
     _reasons.Add(new Pair <Highlighting.Reason, int>(r, 1));
     return(true);
 }
Example #3
0
 private Color HighlightColor()
 {
     return(Highlighting.Color(
                _highlightReasons.Current(), Research.techLevel));
 }