void RemoveElement(Hex hex) { var position = CurrentBoard?.GetPosition(hex); if (position == null) { return; } if (!position.HasData()) { return; } var data = position.Data; position.RemoveData(); OnRemoveElement(data, GetCellCoordinate(hex)); }
void AddElement(BoardElement element, Hex hex) { var position = CurrentBoard.GetPosition(hex); if (position == null) { return; } if (position.HasData()) { return; } position.AddData(element); var cell = GetCellCoordinate(hex); OnAddElement(element, cell); }