void AddToHistory <T>(List <HistoryElement <T> > history, HistoryElement <T> historyElement) where T : MoveInfoBase { if (history.Count > MAX_HISTORY_LENGTH) { history.Remove(history.Last()); } else { historyElement.ID += 1; history.Add(historyElement); } }
void AddToFogHistory(HistoryElement <MapDirectionMoveInfo> historyElement) { AddToHistory(fogHistory, historyElement); }
public new void Add(HistoryElement <TMapInfo> historyElement) { historyElement.ID = ID; ID++; Add(historyElement); }
void AddToMapHistory(HistoryElement <MapMoveInfo> historyElement) { AddToHistory(mapHistory, historyElement); }