////////////////////////////////////////////////////////////////////////////// #region Bombs public void SetBomb(Bomb bomb) { AddCell(bomb); FieldCellSlot slot = GetSlot(bomb); PowerupCell powerup = slot.GetPowerup(); if (powerup != null) { powerup.RemoveFromField(); } else { FlameCell flame = slot.GetFlame(); if (flame != null) { bomb.Blow(); } } }
public PowerupCell GetPowerup(int cx, int cy) { FieldCellSlot slot = GetSlot(cx, cy); return(slot != null?slot.GetPowerup() : null); }