HivePuzzle

class HivePuzzle(val spec: HiveSpec, val letters: Map<Hex, Char>, val words: List<PlacedWord>)

A hive of letters hiding words as paths of neighbouring cells. Players trace any path of adjacent cells; target words are accepted, other real words count as extras.

Constructors

Link copied to clipboard
constructor(spec: HiveSpec, letters: Map<Hex, Char>, words: List<PlacedWord>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val cells: List<Hex>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun evaluate(path: List<Hex>, found: Set<String>, extras: Set<String>): HiveVerdict
Link copied to clipboard
fun shuffled(found: Set<String>, random: Random = Random.Default): HivePuzzle

Rearranges the whole hive; every word not yet found is re-hidden so it stays spellable.

Link copied to clipboard
fun spell(path: List<Hex>): String