private void DestroyWall(MazeCell cell, string compassDirection, bool condition) { if (condition) { GameObject wall = cell.GetWall(compassDirection); if (wall != null) { GameObject.Destroy(wall); } } }