public void Add(ushort x, ushort z, ushort y, byte type) { ExtraData <ushort, ExtraData <ushort, RedoList> > xLevel = changes[x]; ExtraData <ushort, RedoList> zLevel; RedoList yLevel; if (xLevel == null) { xLevel = new ExtraData <ushort, ExtraData <ushort, RedoList> >(); zLevel = new ExtraData <ushort, RedoList>(); yLevel = new RedoList(); yLevel.Add(type); zLevel[y] = yLevel; xLevel[z] = zLevel; changes[x] = xLevel; } else { zLevel = xLevel[z]; if (zLevel == null) { zLevel = new ExtraData <ushort, RedoList>(); yLevel = new RedoList(); yLevel.Add(type); zLevel[y] = yLevel; xLevel[z] = zLevel; } else { yLevel = zLevel[y]; if (yLevel == null) { yLevel = new RedoList(); yLevel.Add(type); zLevel[y] = yLevel; } else { yLevel.Add(type); } } } }
public void Add(ushort x, ushort z, ushort y, byte type) { ExtraData<ushort, ExtraData<ushort, RedoList>> xLevel = changes[x]; ExtraData<ushort, RedoList> zLevel; RedoList yLevel; if (xLevel == null) { xLevel = new ExtraData<ushort, ExtraData<ushort, RedoList>>(); zLevel = new ExtraData<ushort, RedoList>(); yLevel = new RedoList(); yLevel.Add(type); zLevel[y] = yLevel; xLevel[z] = zLevel; changes[x] = xLevel; } else { zLevel = xLevel[z]; if (zLevel == null) { zLevel = new ExtraData<ushort, RedoList>(); yLevel = new RedoList(); yLevel.Add(type); zLevel[y] = yLevel; xLevel[z] = zLevel; } else { yLevel = zLevel[y]; if (yLevel == null) { yLevel = new RedoList(); yLevel.Add(type); zLevel[y] = yLevel; } else { yLevel.Add(type); } } } }