/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public Layer(Face face) { _locations = new List<Location>(); Index = face.Index; Name = face.Name; Initial = face.Initial; Direction = face.Direction; Face = face; Face.Layer = this; }
static Faces() { _all = new List<Face>(); All = _all; Origin = new Point3D(); Up = NewFace(Directions.Up, Colors.White); Down = NewFace(Directions.Down, Colors.Yellow); Front = NewFace(Directions.Front, Colors.Green); Back = NewFace(Directions.Back, Colors.Blue); Right = NewFace(Directions.Right, Colors.Red); Left = NewFace(Directions.Left, Colors.Orange); }
private static Face NewFace(Direction direction, Color color) { var face = new Face(direction, color); _all.Add(face); return face; }
private static Layer NewLayer(Face face) { var layer = new Layer(face); _all.Add(layer); return layer; }
/// <summary> /// Gets the color of the specified face of the cubie. /// </summary> /// <param name="f">The face.</param> /// <returns>The color.</returns> public RubiksColor?GetColor(Face f) { return(Colors[(int)f - 1]); }