Improvements

try to make it run on Android (still unsuccessful)
This commit is contained in:
2024-08-21 00:37:29 +02:00
parent 9175e54c69
commit 082899152f
34 changed files with 84 additions and 20 deletions

View File

@@ -0,0 +1,27 @@
package ch.dissem.yaep.domain
abstract class ClueTest {
protected val size = 6
protected fun createGrid(
selection: (Item<ItemClass<*>>) -> Item<ItemClass<*>>? = { it }
) = Grid(
ItemClass.randomClasses(size)
.map {
it.randomItems(size).map { item -> Item(item) }
}
.map { row ->
GameRow(
category = row.first().itemType.companion,
options = row,
cells = row.map {
GameCell(
selection = selection(it),
solution = it,
options = mutableListOf()
)
}
)
}
)
}