void AddGemRandomlyInCells() { Gems = new Gem[Def.Width, Def.Depth + 2]; Gems.Fill(CreateGem); Gems.ForEach(item => { if (!item) { return; } DestroyBlock(item.Cell, false); }); }
void AddGemRandomlyInRows() { Gems = new Gem[Def.Width, Def.Depth + 2]; int spacing = Def.Index * 2; for (int y = 0; y <= Gems.GetLength(1); y += spacing) { spacing++; var x = PRNG.Int(Def.Width); Gems[x, y] = CreateGem(x, y); } Gems.ForEach(item => { if (!item) { return; } DestroyBlock(item.Cell, false); }); }