Пример #1
0
        public IsoCoKuData(int[] pins, Triangle[] triangles)
        {
            this.pins = pins;
            this.triangles = triangles;

            CountDots();
        }
Пример #2
0
 public Triangle(Triangle triangle, int rotation)
     : this(triangle.dots, rotation)
 {
 }
Пример #3
0
        public void rotate(int triangle, int rotation)
        {
            RemoveDots(triangle);

            triangles[triangle] = new Triangle(triangles[triangle], rotation);

            AddDots(triangle);
        }
Пример #4
0
        private void SetDefaultTriangles()
        {
            for (int n = 0; n < 20; n++)
            {
                triangles[n] = new Triangle(Triangle.Triangles[n], 0);
            }

            CountDots();
        }
Пример #5
0
        public void swap(int triangle1, int triangle2, int rotation1, int rotation2)
        {
            RemoveDots(triangle1);
            RemoveDots(triangle2);

            Triangle buffer = triangles[triangle1];
            triangles[triangle1] = new Triangle(triangles[triangle2], rotation2);
            triangles[triangle2] = new Triangle(buffer, rotation1);

            AddDots(triangle1);
            AddDots(triangle2);
        }