示例#1
0
 /// <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;
 }
示例#2
0
 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);
 }
示例#3
0
 private static Face NewFace(Direction direction, Color color)
 {
     var face = new Face(direction, color);
      _all.Add(face);
      return face;
 }
示例#4
0
 private static Layer NewLayer(Face face)
 {
     var layer = new Layer(face);
      _all.Add(layer);
      return layer;
 }
示例#5
0
 /// <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]);
 }