-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce new sudoku types classic_12x12, reworked classic_6x6
- Loading branch information
1 parent
cf0a5c8
commit 175769b
Showing
24 changed files
with
205 additions
and
48 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/main/kotlin/io/github/ilikeyourhat/kudoku/type/Classic12x12.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package io.github.ilikeyourhat.kudoku.type | ||
|
||
import io.github.ilikeyourhat.kudoku.model.SudokuType | ||
import io.github.ilikeyourhat.kudoku.model.dividers.RegionDivider | ||
|
||
object Classic12x12 : SudokuType { | ||
|
||
override val name = "classic_12x12" | ||
override val sizeX = 12 | ||
override val sizeY = 12 | ||
override val maxValue = 12 | ||
|
||
override fun template() = """ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
_,_,_,_ _,_,_,_ _,_,_,_ | ||
""".trimIndent() | ||
|
||
override fun divider(): RegionDivider { | ||
return RegionDivider() | ||
.divideByRows() | ||
.divideByColumns() | ||
.divideByBlocks(4, 3) | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/kotlin/io/github/ilikeyourhat/kudoku/type/Classic12x12Vertical.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package io.github.ilikeyourhat.kudoku.type | ||
|
||
import io.github.ilikeyourhat.kudoku.model.SudokuType | ||
import io.github.ilikeyourhat.kudoku.model.dividers.RegionDivider | ||
|
||
object Classic12x12Vertical : SudokuType { | ||
|
||
override val name = "classic_12x12_vertical" | ||
override val sizeX = 12 | ||
override val sizeY = 12 | ||
override val maxValue = 12 | ||
|
||
override fun template() = """ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
_,_,_ _,_,_ _,_,_ _,_,_ | ||
""".trimIndent() | ||
|
||
override fun divider(): RegionDivider { | ||
return RegionDivider() | ||
.divideByRows() | ||
.divideByColumns() | ||
.divideByBlocks(3, 4) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ku/integration/type/Butterfly12x12Test.kt → ...yourhat/kudoku/type/Butterfly12x12Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/test/kotlin/io/github/ilikeyourhat/kudoku/type/Classic12x12Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package io.github.ilikeyourhat.kudoku.type | ||
|
||
class Classic12x12Test : SudokuTypeTestTemplate() { | ||
|
||
override val puzzle = """ | ||
classic_12x12 | ||
01,__,05,__, 02,__,__,__, __,__,12,08 | ||
08,__,04,__, __,07,__,__, __,__,__,__ | ||
__,__,__,07, __,__,12,06, 02,__,05,__ | ||
12,__,__,__, __,__,__,__, 04,08,__,__ | ||
05,06,09,__, __,02,__,04, __,__,10,__ | ||
__,04,03,__, __,06,__,01, __,__,09,__ | ||
06,__,01,__, __,__,__,07, __,11,__,02 | ||
03,__,__,__, __,__,__,02, __,05,__,09 | ||
__,__,02,__, __,__,05,10, 03,__,08,__ | ||
__,__,__,__, __,__,__,__, __,02,__,__ | ||
__,__,__,12, 01,__,__,05, __,10,__,__ | ||
__,__,__,__, __,__,06,__, 08,__,07,01 | ||
""".trimIndent() | ||
|
||
override val solution = """ | ||
classic_12x12 | ||
01,03,05,06, 02,10,04,09, 11,07,12,08 | ||
08,12,04,02, 05,07,01,11, 06,09,03,10 | ||
11,09,10,07, 03,08,12,06, 02,01,05,04 | ||
12,10,07,01, 11,05,09,03, 04,08,02,06 | ||
05,06,09,11, 12,02,08,04, 01,03,10,07 | ||
02,04,03,08, 07,06,10,01, 05,12,09,11 | ||
06,05,01,09, 08,12,03,07, 10,11,04,02 | ||
03,08,12,10, 06,04,11,02, 07,05,01,09 | ||
07,11,02,04, 09,01,05,10, 03,06,08,12 | ||
10,01,06,03, 04,09,07,08, 12,02,11,05 | ||
04,07,08,12, 01,11,02,05, 09,10,06,03 | ||
09,02,11,05, 10,03,06,12, 08,04,07,01 | ||
""".trimIndent() | ||
} |
40 changes: 40 additions & 0 deletions
40
src/test/kotlin/io/github/ilikeyourhat/kudoku/type/Classic12x12VerticalTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.github.ilikeyourhat.kudoku.type | ||
|
||
class Classic12x12VerticalTest : SudokuTypeTestTemplate() { | ||
|
||
override val puzzle = """ | ||
classic_12x12_vertical | ||
__,__,__, __,01,__, __,07,__, __,05,12 | ||
__,__,09, __,__,04, 01,12,__, __,__,__ | ||
__,__,__, 06,__,__, __,02,__, __,__,__ | ||
11,10,07, __,__,__, __,__,04, __,01,__ | ||
09,__,__, 02,05,10, __,__,__, __,03,04 | ||
__,11,03, 04,__,__, __,__,06, __,10,__ | ||
__,__,__, __,12,07, __,11,__, __,09,__ | ||
05,__,__, __,__,01, __,__,__, __,__,__ | ||
__,__,02, 10,__,__, 11,__,12, __,__,__ | ||
__,__,__, 05,__,__, __,__,__, __,__,08 | ||
__,__,__, __,__,__, 09,__,10, 06,07,__ | ||
__,__,__, __,07,__, __,__,__, __,02,05 | ||
""".trimIndent() | ||
|
||
override val solution = """ | ||
classic_12x12_vertical | ||
02,03,06, 08,01,09, 10,07,11, 04,05,12 | ||
08,05,09, 07,11,04, 01,12,03, 02,06,10 | ||
04,01,12, 06,10,03, 05,02,08, 07,11,09 | ||
11,10,07, 12,02,05, 06,09,04, 08,01,03 | ||
09,06,01, 02,05,10, 12,08,07, 11,03,04 | ||
12,11,03, 04,09,08, 02,01,06, 05,10,07 | ||
10,02,08, 03,12,07, 04,11,05, 01,09,06 | ||
05,07,04, 11,06,01, 03,10,09, 12,08,02 | ||
07,08,02, 10,03,06, 11,05,12, 09,04,01 | ||
01,09,10, 05,04,11, 07,06,02, 03,12,08 | ||
03,12,05, 01,08,02, 09,04,10, 06,07,11 | ||
06,04,11, 09,07,12, 08,03,01, 10,02,05 | ||
""".trimIndent() | ||
} |
4 changes: 2 additions & 2 deletions
4
...doku/integration/type/Classic16x16Test.kt → ...keyourhat/kudoku/type/Classic16x16Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...doku/integration/type/Classic25x25Test.kt → ...keyourhat/kudoku/type/Classic25x25Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...kudoku/integration/type/Classic4x4Test.kt → ...likeyourhat/kudoku/type/Classic4x4Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ntegration/type/Classic6X6VerticalTest.kt → ...hat/kudoku/type/Classic6x6VerticalTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...kudoku/integration/type/Classic9x9Test.kt → ...likeyourhat/kudoku/type/Classic9x9Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...egration/type/DoubleBackslash15x15Test.kt → ...t/kudoku/type/DoubleBackslash15x15Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...integration/type/DoubleDiagonal9x9Test.kt → ...rhat/kudoku/type/DoubleDiagonal9x9Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../integration/type/DoubleSlash15x15Test.kt → ...urhat/kudoku/type/DoubleSlash15x15Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gration/type/SamuraiButterfly30x30Test.kt → .../kudoku/type/SamuraiButterfly30x30Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...tegration/type/SamuraiClassic21x21Test.kt → ...at/kudoku/type/SamuraiClassic21x21Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...tegration/type/SamuraiClassic40x40Test.kt → ...at/kudoku/type/SamuraiClassic40x40Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../kudoku/integration/type/Square1x1Test.kt → ...ilikeyourhat/kudoku/type/Square1x1Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../kudoku/integration/type/Square2x2Test.kt → ...ilikeyourhat/kudoku/type/Square2x2Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...egration/type/TripleBackslash15x15Test.kt → ...t/kudoku/type/TripleBackslash15x15Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../integration/type/TripleSlash15x15Test.kt → ...urhat/kudoku/type/TripleSlash15x15Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters