public void Unregister(MazeBody being, twin cell_pos) { if (bodyHeaps.ContainsKey(cell_pos)) { bodyHeaps[cell_pos].Remove(being); } }
public void Register(MazeBody body, twin cell_pos) { if (!bodyHeaps.ContainsKey(cell_pos)) { bodyHeaps[cell_pos] = new HashSet <MazeBody>(); } bodyHeaps[cell_pos].Add(body); }