public void setFaceSelection(Face3D.SelectionMode selection) { RubikCube.cubes.ToList().ForEach(c => c.Faces.ToList().ForEach(f => { if (f.Selection.HasFlag(Face3D.SelectionMode.Possible)) { f.Selection = selection | Face3D.SelectionMode.Possible; } else if (f.Selection.HasFlag(Face3D.SelectionMode.NotPossible)) { f.Selection = selection | Face3D.SelectionMode.NotPossible; } else { f.Selection = selection; } })); }
public void setFaceSelection(Cube3D.RubikPosition affected, Face3D.FacePosition face, Face3D.SelectionMode selection) { RubikCube.cubes.Where(c => c.Position.HasFlag(affected)).ToList().ForEach(c => c.Faces.Where(f => f.Position == face).ToList().ForEach(f => { if (f.Selection.HasFlag(Face3D.SelectionMode.Possible)) { f.Selection = selection | Face3D.SelectionMode.Possible; } else if (f.Selection.HasFlag(Face3D.SelectionMode.NotPossible)) { f.Selection = selection | Face3D.SelectionMode.NotPossible; } else { f.Selection = selection; } })); }