public T GetValue(int x, int y) { this.CheckBounds(x, y); MatrixPoint search = new MatrixPoint(x,y); if (Objects.ContainsKey(search)) { return Objects[search]; } else { return default(T); } }
public void SetValue(int x, int y, T value) { this.CheckBounds(x, y); MatrixPoint search = new MatrixPoint(x, y); if (Objects.ContainsKey(search)) { Objects[search] = value; } else { Objects.Add(search, value); } }