Skip to content

Commit

Permalink
Package change, introduce Axion for better versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
ILikeYourHat committed Dec 9, 2023
1 parent fa2805a commit c1f1a9b
Show file tree
Hide file tree
Showing 105 changed files with 360 additions and 358 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ mockk = { module = "io.mockk:mockk", version = "1.13.8" }
sat4j = { module = "org.ow2.sat4j:org.ow2.sat4j.core", version.ref = "sat4j" }

[plugins]
axion = { id = "pl.allegro.tech.build.axion-release", version = "1.16.1" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.4" }
5 changes: 3 additions & 2 deletions app/build.gradle.kts → kudoku/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.detekt)
alias(libs.plugins.axion)
}

group = "com.github.ilikeyourhat.kudoku"
version = "1.0"
group = "io.github.ilikeyourhat.kudoku"
version = scmVersion.version

tasks.test {
useJUnitPlatform()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.github.ilikeyourhat.kudoku

import com.github.ilikeyourhat.kudoku.generating.SudokuGenerator
import com.github.ilikeyourhat.kudoku.rating.Difficulty
import com.github.ilikeyourhat.kudoku.rating.DeductionBasedRater
import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.model.SudokuType
import com.github.ilikeyourhat.kudoku.parsing.text.SudokuTextFormatParser
import com.github.ilikeyourhat.kudoku.solving.SolutionCount
import com.github.ilikeyourhat.kudoku.solving.SudokuSolver
import com.github.ilikeyourhat.kudoku.solving.sat.SatSolver
import com.github.ilikeyourhat.kudoku.type.BUILD_IN_TYPES
package io.github.ilikeyourhat.kudoku

import io.github.ilikeyourhat.kudoku.generating.SudokuGenerator
import io.github.ilikeyourhat.kudoku.rating.Difficulty
import io.github.ilikeyourhat.kudoku.rating.DeductionBasedRater
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.model.SudokuType
import io.github.ilikeyourhat.kudoku.parsing.text.SudokuTextFormatParser
import io.github.ilikeyourhat.kudoku.solving.SolutionCount
import io.github.ilikeyourhat.kudoku.solving.SudokuSolver
import io.github.ilikeyourhat.kudoku.solving.sat.SatSolver
import io.github.ilikeyourhat.kudoku.type.BUILD_IN_TYPES
import kotlin.random.Random

object Kudoku {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.github.ilikeyourhat.kudoku.generating
package io.github.ilikeyourhat.kudoku.generating

import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.model.SudokuType
import com.github.ilikeyourhat.kudoku.type.Classic16x16
import com.github.ilikeyourhat.kudoku.type.Classic25x25
import com.github.ilikeyourhat.kudoku.type.Classic4x4
import com.github.ilikeyourhat.kudoku.type.Classic9x9
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.model.SudokuType
import io.github.ilikeyourhat.kudoku.type.Classic16x16
import io.github.ilikeyourhat.kudoku.type.Classic25x25
import io.github.ilikeyourhat.kudoku.type.Classic4x4
import io.github.ilikeyourhat.kudoku.type.Classic9x9
import kotlin.random.Random

class ClassicFilledSudokuGenerator(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.github.ilikeyourhat.kudoku.generating
package io.github.ilikeyourhat.kudoku.generating

import com.github.ilikeyourhat.kudoku.model.Field
import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.model.SudokuType
import com.github.ilikeyourhat.kudoku.solving.SolutionCount
import com.github.ilikeyourhat.kudoku.solving.SudokuSolutionChecker
import com.github.ilikeyourhat.kudoku.solving.sat.SatSolver
import io.github.ilikeyourhat.kudoku.model.Field
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.model.SudokuType
import io.github.ilikeyourhat.kudoku.solving.SolutionCount
import io.github.ilikeyourhat.kudoku.solving.SudokuSolutionChecker
import io.github.ilikeyourhat.kudoku.solving.sat.SatSolver
import kotlin.random.Random

class FilledSudokuGenerator(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.github.ilikeyourhat.kudoku.generating
package io.github.ilikeyourhat.kudoku.generating

import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.model.SudokuType
import com.github.ilikeyourhat.kudoku.rating.DeductionBasedRater
import com.github.ilikeyourhat.kudoku.rating.Difficulty
import com.github.ilikeyourhat.kudoku.rating.SudokuRater
import com.github.ilikeyourhat.kudoku.solving.SudokuSolutionChecker
import com.github.ilikeyourhat.kudoku.solving.sat.SatSolver
import com.github.ilikeyourhat.kudoku.type.CLASSIC_TYPES
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.model.SudokuType
import io.github.ilikeyourhat.kudoku.rating.DeductionBasedRater
import io.github.ilikeyourhat.kudoku.rating.Difficulty
import io.github.ilikeyourhat.kudoku.rating.SudokuRater
import io.github.ilikeyourhat.kudoku.solving.SudokuSolutionChecker
import io.github.ilikeyourhat.kudoku.solving.sat.SatSolver
import io.github.ilikeyourhat.kudoku.type.CLASSIC_TYPES
import kotlin.random.Random

open class SudokuGenerator(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.ilikeyourhat.kudoku.generating
package io.github.ilikeyourhat.kudoku.generating

import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.rating.Difficulty
import com.github.ilikeyourhat.kudoku.rating.SudokuRater
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.rating.Difficulty
import io.github.ilikeyourhat.kudoku.rating.SudokuRater
import kotlin.random.Random

class SudokuHolePuncher(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.github.ilikeyourhat.kudoku.generating
package io.github.ilikeyourhat.kudoku.generating

import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.type.CLASSIC_TYPES
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.type.CLASSIC_TYPES
import kotlin.math.sqrt
import kotlin.random.Random

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.github.ilikeyourhat.kudoku.model
package io.github.ilikeyourhat.kudoku.model

import com.github.ilikeyourhat.kudoku.model.matrix.ListMatrix
import com.github.ilikeyourhat.kudoku.model.matrix.Matrix
import io.github.ilikeyourhat.kudoku.model.matrix.ListMatrix
import io.github.ilikeyourhat.kudoku.model.matrix.Matrix

data class Board(
private val fields: Matrix<Field?>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model
package io.github.ilikeyourhat.kudoku.model

object BoardCreator {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model
package io.github.ilikeyourhat.kudoku.model

data class Field(
val position: Point,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model
package io.github.ilikeyourhat.kudoku.model

data class Point(
val x: Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model
package io.github.ilikeyourhat.kudoku.model

data class Region(
val fields: Set<Field>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model
package io.github.ilikeyourhat.kudoku.model

data class Sudoku(
val type: SudokuType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.ilikeyourhat.kudoku.model
package io.github.ilikeyourhat.kudoku.model

import com.github.ilikeyourhat.kudoku.model.dividers.RegionDivider
import io.github.ilikeyourhat.kudoku.model.dividers.RegionDivider

interface SudokuType {
val name: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.ilikeyourhat.kudoku.model.dividers
package io.github.ilikeyourhat.kudoku.model.dividers

import com.github.ilikeyourhat.kudoku.model.Board
import com.github.ilikeyourhat.kudoku.model.Field
import com.github.ilikeyourhat.kudoku.model.Region
import com.github.ilikeyourhat.kudoku.model.SudokuType
import io.github.ilikeyourhat.kudoku.model.Board
import io.github.ilikeyourhat.kudoku.model.Field
import io.github.ilikeyourhat.kudoku.model.Region
import io.github.ilikeyourhat.kudoku.model.SudokuType

class RegionDivider {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.ilikeyourhat.kudoku.model.hint
package io.github.ilikeyourhat.kudoku.model.hint

import com.github.ilikeyourhat.kudoku.model.Field
import com.github.ilikeyourhat.kudoku.model.Point
import com.github.ilikeyourhat.kudoku.model.Region
import com.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.model.Field
import io.github.ilikeyourhat.kudoku.model.Point
import io.github.ilikeyourhat.kudoku.model.Region
import io.github.ilikeyourhat.kudoku.model.Sudoku

data class SudokuHintGrid(
private val hintMap: Map<Point, MutableSet<Int>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model.matrix
package io.github.ilikeyourhat.kudoku.model.matrix

class ListMatrix<E>(
override val sizeX: Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model.matrix
package io.github.ilikeyourhat.kudoku.model.matrix

interface Matrix<E> : Collection<E> {
val sizeX: Int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.model.matrix
package io.github.ilikeyourhat.kudoku.model.matrix

interface MutableMatrix<E> : Matrix<E> {
operator fun set(x: Int, y: Int, elem: E)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.ilikeyourhat.kudoku.parsing.text
package io.github.ilikeyourhat.kudoku.parsing.text

import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.model.SudokuType
import com.github.ilikeyourhat.kudoku.type.BUILD_IN_TYPES
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.model.SudokuType
import io.github.ilikeyourhat.kudoku.type.BUILD_IN_TYPES
import java.io.File
import java.io.FileNotFoundException
import java.util.Scanner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.github.ilikeyourhat.kudoku.rating
package io.github.ilikeyourhat.kudoku.rating

import com.github.ilikeyourhat.kudoku.model.Sudoku
import com.github.ilikeyourhat.kudoku.solving.SolutionCount
import com.github.ilikeyourhat.kudoku.solving.SudokuSolutionChecker
import com.github.ilikeyourhat.kudoku.solving.SudokuSolver
import com.github.ilikeyourhat.kudoku.solving.deduction.solver.DeductionSolverV1
import com.github.ilikeyourhat.kudoku.solving.deduction.solver.DeductionSolverV2
import com.github.ilikeyourhat.kudoku.solving.deduction.solver.DeductionSolverV3
import com.github.ilikeyourhat.kudoku.solving.sat.SatSolver
import io.github.ilikeyourhat.kudoku.model.Sudoku
import io.github.ilikeyourhat.kudoku.solving.SolutionCount
import io.github.ilikeyourhat.kudoku.solving.SudokuSolutionChecker
import io.github.ilikeyourhat.kudoku.solving.SudokuSolver
import io.github.ilikeyourhat.kudoku.solving.deduction.solver.DeductionSolverV1
import io.github.ilikeyourhat.kudoku.solving.deduction.solver.DeductionSolverV2
import io.github.ilikeyourhat.kudoku.solving.deduction.solver.DeductionSolverV3
import io.github.ilikeyourhat.kudoku.solving.sat.SatSolver

class DeductionBasedRater(
private val easySolver: SudokuSolver = DeductionSolverV1(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.rating
package io.github.ilikeyourhat.kudoku.rating

enum class Difficulty {
EASY, MEDIUM, HARD, VERY_HARD, UNSOLVABLE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.github.ilikeyourhat.kudoku.rating

import io.github.ilikeyourhat.kudoku.model.Sudoku

interface SudokuRater {
fun rate(sudoku: Sudoku): Difficulty
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.ilikeyourhat.kudoku.solving
package io.github.ilikeyourhat.kudoku.solving

enum class SolutionCount {
ZERO, ONE, MANY
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.github.ilikeyourhat.kudoku.solving

import io.github.ilikeyourhat.kudoku.model.Sudoku

interface SudokuSolutionChecker {
fun checkSolutions(sudoku: Sudoku): SolutionCount
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.github.ilikeyourhat.kudoku.solving

import io.github.ilikeyourhat.kudoku.model.Sudoku

interface SudokuSolver {
fun solve(sudoku: Sudoku): Sudoku
}
Loading

0 comments on commit c1f1a9b

Please sign in to comment.