예제 #1
0
        public IsoCoKuData(int[] pins, Triangle[] triangles)
        {
            this.pins = pins;
            this.triangles = triangles;

            CountDots();
        }
예제 #2
0
파일: Triangle.cs 프로젝트: genveir/IsoCoKu
 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);
        }