Пример #1
0
 internal void RemoveCubeWith3Faces(CubeWith3Faces cube)
 {
     if (!cubesWith3Faces.Remove(cube))
     {
         throw new InvalidOperationException("cube was not found in set");
     }
 }
Пример #2
0
 public InitialRubixCubeBuilder()
 {
     cubesWith1Face       = new FixedLengthSet <CubeWith1Face>(RubixCube.NumberOfCubesWith1Face);
     cubesWith2Faces      = new FixedLengthSet <CubeWith2Faces>(RubixCube.NumberOfCubesWith2Faces);
     cubesWith3Faces      = new FixedLengthSet <CubeWith3Faces>(RubixCube.NumebrOfCubesWith3Faces);
     frontCube            = new CubeWith1Face();
     topCube              = new CubeWith1Face();
     bottomCube           = new CubeWith1Face();
     leftCube             = new CubeWith1Face();
     rightCube            = new CubeWith1Face();
     backCube             = new CubeWith1Face();
     frontTopCube         = new CubeWith2Faces();
     frontLeftCube        = new CubeWith2Faces();
     frontRightCube       = new CubeWith2Faces();
     frontBottomCube      = new CubeWith2Faces();
     leftTopCube          = new CubeWith2Faces();
     leftBottomCube       = new CubeWith2Faces();
     rightTopCube         = new CubeWith2Faces();
     rightBottomCube      = new CubeWith2Faces();
     backTopCube          = new CubeWith2Faces();
     backLeftCube         = new CubeWith2Faces();
     backRightCube        = new CubeWith2Faces();
     backBottomCube       = new CubeWith2Faces();
     frontTopLeftCube     = new CubeWith3Faces();
     frontTopRightCube    = new CubeWith3Faces();
     frontBottomLeftCube  = new CubeWith3Faces();
     frontBottomRightCube = new CubeWith3Faces();
     backTopLeftCube      = new CubeWith3Faces();
     backTopRightCube     = new CubeWith3Faces();
     backBottomLeftCube   = new CubeWith3Faces();
     backBottomRightCube  = new CubeWith3Faces();
     InitializeRubixCube();
 }
Пример #3
0
 internal void AddCubeWith3Faces(CubeWith3Faces cube)
 {
     cubesWith3Faces.Add(cube);
 }