public void AddComponent(MazeComponent c, int x, int y) { if (!(x >= length || y >= height || x < 0 || y < 0)) { map[x, y] = c; } }
public MazeComponent CreateComponent(ComponentType ct) { if (null == flyweights[(int)ct]) { flyweights[(int)ct] = new MazeComponent(ct); } return(flyweights[(int)ct]); }