Beispiel #1
0
 public Suduku(SudukuType Type, int[,] Table, int[,] Conflicts = null)
 {
     this.Table      = Table;
     this.SudukuType = Type;
     GenerateHash(Table);
     CalculateConflicts(Conflicts);
 }
Beispiel #2
0
        public Suduku(SudukuType Type)
        {
            switch (Type)
            {
            case SudukuType.Four_Four:
                this.Table = new int[4, 4]
                {
                    { 1, 2, 3, 4 },
                    { 1, 2, 3, 4 },
                    { 1, 2, 3, 4 },
                    { 1, 2, 3, 4 }
                };
                break;

            case SudukuType.Nine_Nine:
                this.Table = new int[9, 9]
                {
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
                    { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
                };
                break;

            default:
                break;
            }
            this.SudukuType = Type;
            CalculateConflicts(null);
            GenerateHash(this.Table);
        }