Render puzzle (WIP)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package domain
|
||||
|
||||
import androidx.compose.ui.util.fastAny
|
||||
|
||||
class Game(
|
||||
val grid: Grid,
|
||||
val clues: List<Clue>
|
||||
@@ -18,7 +20,6 @@ class Game(
|
||||
gameCell.options.remove(position.item)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +35,5 @@ class Game(
|
||||
}
|
||||
|
||||
fun areRulesViolated(): Boolean = clues
|
||||
.map { it.isRuleViolated(grid) }
|
||||
.reduce { a, b -> a || b }
|
||||
.any { it.isRuleViolated(grid) }
|
||||
}
|
||||
Reference in New Issue
Block a user