summaryrefslogtreecommitdiff
path: root/core/src/commonMain/kotlin/coffee/liz/rookery/scramble/Scrambler.kt
blob: c112d7be45320e489e073860c42b477075e34848 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package coffee.liz.rookery.scramble

import coffee.liz.rookery.model.Event

interface Scrambler {
    /** A fresh scramble. May block while solver tables warm up; call off the UI thread. */
    fun next(event: Event): String

    /** An SVG drawing of the scrambled puzzle, or null if unavailable. */
    fun previewSvg(event: Event, scramble: String): String?

    /** Moves that solve a 3x3 given as 54 facelets (U R F D L B), or null if unavailable or unsolvable. */
    fun solve3x3(facelets: String): String? = null

    /** Start building solver tables / a scramble ahead of time. */
    fun warm(event: Event) {}
}