|
|
|
|
|
|
|
|
|
|
This idea is cooler than dirt! |
So then, I thought this was something of a contest. Am I supposed to post my answer? |
|
|
|
|
|
|
&
to do bit-wise comparisons on them. The code would be heaps nastier.
|
|
exp += (expBits & 0x7F);
which does the same thing.
|
|
|
|
if (2 < x < 99) happiness();
if ((2 < x) && (x < 99)) acceptable();
if (2 < ranger( x ) < 99) grins();
if (ranger( 2 ) < x <= y < 99) grins();
comparisons like X<=Y<=Z do not have their mathematical meaning |
cout << x << y << endl; |
|
|
; File Format Documentation ;----------------------------------------------------------------------------- ; ; (name size rows-per-region columns-per-region) ; (name size [characters] regions...) ; (name reference [characters] regions...) ; ; A 'region' is a list of (row column) cell indices. ; Regions may overlap and leave holes in the gameboard. ; ; A 'reference' is a name of an existing Sudoku board defined elsewhere in ; this file, to which additional regions are added. ; ; ... (some commentary excluded to fit the post limit) ("Sudoku" 9 3 3) ;----------------------------------------------------------------------------- ; Small Sudoku Variants ;----------------------------------------------------------------------------- ("Shidoku" 4 2 2) ("Logi-5" 5 ((1 1) (2 1) (3 1) (4 1) (5 1)) ((1 2) (1 3) (2 2) (3 2) (4 2)) ((5 2) (5 3) (4 3) (3 3) (4 4)) ((2 3) (1 4) (1 5) (2 4) (3 4)) ((5 4) (2 5) (3 5) (4 5) (5 5))) ("Pento-Sudoku" 5 ((1 1) (1 2) (1 3) (2 1) (2 2)) ((1 4) (1 5) (2 4) (2 5) (3 5)) ((2 3) (3 2) (3 3) (3 4) (4 3)) ((3 1) (4 1) (4 2) (5 1) (5 2)) ((4 4) (4 5) (5 3) (5 4) (5 5))) ("Magic Pentominoes" 6 ((1 1) (1 2) (1 3) (2 1) (2 2)) ((1 4) (1 5) (2 5) (2 6) (3 6)) ((2 3) (3 3) (3 4) (3 5) (4 4)) ((3 1) (4 1) (4 2) (4 3) (5 1)) ((4 6) (5 5) (5 6) (6 5) (6 6)) ((5 2) (5 4) (6 2) (6 3) (6 4))) ("Mini Sudoku (Rokudoku)" 6 3 2) ("Rokudoku X" 6 ((1 1) (2 2) (3 3) (4 4) (5 5) (6 6)) ((1 2) (1 3) (1 4) (1 5) (2 3) (2 4)) ((1 6) (2 5) (3 4) (4 3) (5 2) (6 1)) ((2 1) (3 1) (3 2) (4 1) (4 2) (5 1)) ((2 6) (3 5) (3 6) (4 5) (4 6) (5 6)) ((5 3) (5 4) (6 2) (6 3) (6 4) (6 5))) ("Rokudoku Jigsaw" 6 ((1 1) (1 2) (2 1) (2 2) (3 1) (4 1)) ((1 3) (1 4) (1 5) (1 6) (2 5) (2 6)) ((2 3) (2 4) (3 2) (3 3) (3 4) (3 2)) ((3 5) (4 3) (4 4) (4 5) (5 3) (5 4)) ((3 6) (4 6) (5 5) (5 6) (6 5) (6 6)) ((5 1) (5 2) (6 1) (6 2) (6 3) (6 4))) ("Dominoku" 7 ((1 1) (1 2) (1 3) (1 4) (2 2) (2 3) (4 3)) ((1 5) (1 6) (1 7) (2 5) (2 7) (3 7) (4 7)) ((2 1) (3 1) (3 2) (4 1) (4 2) (5 1) (6 1)) ((2 4) (2 6) (3 4) (3 5) (3 6) (4 4) (4 6)) ((4 3) (5 2) (5 3) (6 2) (7 1) (7 2) (7 3)) ((4 5) (5 4) (5 5) (6 3) (6 4) (6 5) (6 6)) ((5 6) (5 7) (6 7) (7 4) (7 5) (7 6) (7 7))) ("Mini Jigsaw Sudoku" 7 ((1 1) (1 2) (1 3) (2 1) (2 2) (2 3) (3 1)) ((1 3) (2 4) (3 2) (3 3) (3 4) (4 1) (4 2)) ((1 5) (1 6) (1 7) (2 6) (2 7) (3 6) (3 7)) ((2 5) (3 5) (4 3) (4 4) (4 5) (5 3) (6 3)) ((4 6) (4 7) (5 4) (5 5) (5 6) (6 4) (7 4)) ((5 1) (5 2) (6 1) (6 2) (7 1) (7 2) (7 3)) ((5 7) (6 5) (6 6) (6 7) (7 5) (7 6) (7 7))) ("Mini Sudoku (Yattsudoku)" 8 4 2) ("Yattsu-Manji-Doku" 8 ((1 1) (1 2) (1 3) (1 4) (2 1) (2 2) (2 3) (2 4)) ((3 1) (3 2) (3 3) (3 4) (4 1) (4 2) (4 3) (4 4)) ((1 5) (1 6) (2 5) (2 6) (3 5) (3 6) (4 5) (4 6)) ((1 7) (1 8) (2 7) (2 8) (3 7) (3 8) (4 7) (4 8)) ((5 1) (5 2) (6 1) (6 2) (7 1) (7 2) (8 1) (8 2)) ((5 3) (5 4) (6 3) (6 4) (7 3) (7 4) (8 3) (8 4)) ((5 5) (5 6) (5 7) (5 8) (6 5) (6 6) (6 7) (6 8)) ((7 5) (7 6) (7 7) (7 8) (8 5) (8 6) (8 7) (8 8))) ;----------------------------------------------------------------------------- ; Vanilla Sudoku Variants ;----------------------------------------------------------------------------- ("Sudoku X" "Sudoku" ((1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7) (8 8) (9 9)) ((1 9) (2 8) (3 7) (4 6) (5 5) (6 4) (7 3) (8 2) (9 1))) ("HyperSudoku" "Sudoku" ((2 2) (2 3) (2 4) (3 2) (3 3) (3 4) (4 2) (4 3) (4 4)) ((2 6) (2 7) (2 8) (3 6) (3 7) (3 8) (4 6) (4 7) (4 8)) ((6 2) (6 3) (6 4) (7 2) (7 3) (7 4) (7 2) (7 3) (7 4)) ((6 6) (6 7) (6 8) (7 6) (7 7) (7 8) (8 6) (8 7) (8 8))) ("Costas Array Sudoku" "Sudoku" ((1 1) (2 2) (3 7) (4 5) (5 9 8)(6 6) (7 8) (8 4 5)(9 3) dark red) ((1 2) (2 7) (3 5) (4 9 9)(5 6) (6 8 5)(7 4 3)(8 3) (9 1) dark purple) ((1 3) (2 1) (3 2) (4 7) (5 5) (6 9) (7 6 6)(8 8) (9 4) orange) ((1 4) (2 3) (3 1) (4 2 6)(5 7) (6 5) (7 9) (8 6 8)(9 8) yellow) ((1 5 3)(2 9) (3 6 7)(4 8) (5 4) (6 3) (7 1) (8 2) (9 7) light blue) ((1 6) (2 8) (3 4 1)(4 3 7)(5 1 2)(6 2) (7 7 8)(8 5 9)(9 9) dark green) ((1 7) (2 5 6)(3 9) (4 6) (5 8 1)(6 4) (7 3) (8 1) (9 2) light purple) ((1 8) (2 4 9)(3 3 4)(4 1) (5 2 3)(6 7 6)(7 5) (8 9) (9 6) light green) ((1 9) (2 6 2)(3 8) (4 4) (5 3) (6 1 1)(7 2) (8 7) (9 5 4) light cyan)) ;----------------------------------------------------------------------------- ; Big Sudoku Variants ;----------------------------------------------------------------------------- ("Juudoku" 10 5 2) ("Juudoku X" "Juudoku" ((1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7) (8 8) (9 9) (A A)) ((1 A) (2 9) (3 8) (4 7) (5 6) (6 5) (7 4) (8 3) (9 2) (A 1))) ("Harry Potter Sudoku" 11 "HARRY POTTER" ((1 1 H)(1 2) (1 3) (2 1) (2 2 A)(2 3) (3 1) (3 2) (3 3 R)(4 1) (4 2) yellow) ((1 3) (1 5) (2 4) (2 5) (2 6) (3 5) (3 6) (3 7) (4 5) (4 6) (4 7) red) ((1 6) (1 7) (1 8) (1 9) (1 A) (1 B) (2 7) (2 8) (2 9) (2 A) (3 8) yellow) ((2 B) (3 9) (3 A) (3 B) (4 8) (4 9) (4 A) (4 B) (5 9) (5 A) (5 B) yellow) ((3 4) (4 3) (4 4 R)(5 1) (5 2) (5 3) (5 4) (5 5 Y)(6 1) (6 2) (6 3) yellow) ((5 6) (5 7) (5 8) (6 4) (6 5) (6 6 P)(6 7) (6 8) (7 4) (7 5) (7 6) red) ((6 9) (6 A) (6 B) (7 7 O)(7 8) (7 9) (7 A) (7 B) (8 8 T)(8 9) (9 8) yellow) ((7 1) (7 2) (7 3) (8 1) (8 2) (8 3) (8 4) (9 1) (9 2) (9 3) (A 1) yellow) ((8 5) (8 6) (8 7) (9 5) (9 6) (9 7) (A 6) (A 7) (A 8) (B 7) (B 8) red) ((8 A) (8 B) (9 9 T)(9 A) (9 B) (A 9) (A A E)(A B) (B 9) (B A) (B B R) yellow) ((9 4) (A 2) (A 3) (A 4) (A 5) (B 1) (B 2) (B 3) (B 4) (B 5) (B 6) yellow)) ("Dodeka-doku" 12 4 3) ("Dodeka-doku X" "Dodeka-doku" ((1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7) (8 8) (9 9) (A A) (B B) (C C)) ((1 C) (2 B) (3 A) (4 9) (5 8) (6 7) (7 6) (8 5) (9 4) (A 3) (B 2) (C 1))) ("Carriage House Sudoku" 13 "CARRIAGE HOUSE" ((1 1 C)(1 2) (1 3) (1 4) (2 1) (2 2 A)(2 3) (2 4) (3 1) (3 2) (3 3 R)(4 1) (4 2)) ((1 5) (1 6) (1 7) (1 8) (1 9) (2 5) (2 6) (2 7) (2 8) (2 9) (3 6) (3 7) (3 8)) ((1 A) (1 B) (1 C) (1 D) (2 A) (2 B) (2 C) (2 D) (3 B) (3 C) (3 D) (4 C) (4 D)) ((3 4) (3 5) (4 3) (4 4 R)(4 5) (4 6) (4 7) (5 3) (5 4) (5 5 I)(5 6) (6 4) (6 5)) ((3 9) (3 A) (4 8) (4 9) (4 A) (4 B) (5 8) (5 9) (5 A) (5 B) (6 9) (6 A) (7 A)) ((5 1) (5 2) (6 1) (6 2) (6 3) (7 1) (7 2) (7 3) (8 1) (8 2) (8 3) (9 1) (9 A)) ((5 7) (6 6 A)(6 7) (6 8) (7 5) (7 6) (7 7 G)(7 8) (7 9) (8 6) (8 7) (8 8 E)(9 7)) ((5 C) (5 D) (6 B) (6 C) (6 D) (7 B) (7 C) (7 D) (8 B) (8 C) (8 D) (9 C) (9 D)) ((7 4) (8 4) (8 5) (9 3) (9 4) (9 5) (9 6) (A 3) (A 4) (A 5) (A 6) (B 4) (B 5)) ((8 9) (8 A) (9 8) (9 9 H)(9 A) (9 B) (A 7) (A 8) (A 9) (A A O)(A B) (B 9) (B A)) ((A 1) (A 2) (B 1) (B 2) (B 3) (C 1) (C 2) (C 3) (C 4) (D 1) (D 2) (D 3) (D 4)) ((9 C) (9 D) (A B) (A C) (A D) (B A) (B B U)(B C) (B D) (D A) (D B) (D C) (D D E)) ((B 6) (B 7) (B 8) (C 5) (C 6) (C 7) (C 8) (C 9) (D 5) (D 6) (D 7) (D 8) (D 9))) ("Juu-Go-Doku" 15 5 3) ("Sudoku the Giant" 25 5 5) |