We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfdf8bf commit 5f67283Copy full SHA for 5f67283
games-core/src/main/kotlin/net/zomis/games/dsl/NimGame.kt
@@ -21,7 +21,7 @@ object NimGame {
21
data class NimConfig(val piles: List<Int>, val lastWins: Boolean, val maxPerTurn: Int)
22
data class NimMove(val pileIndex: Int, val amount: Int)
23
24
- val action = createActionType("Take", NimMove::class)
+ val nimAction = createActionType("Take", NimMove::class)
25
val game = createGame<Nim>("Nim") {
26
setup(NimConfig::class) {
27
players(2..2)
@@ -33,7 +33,7 @@ object NimGame {
33
}
34
35
logic {
36
- action(action) {
+ action(nimAction) {
37
options {
38
optionFrom({ it.piles.indices }) {pileIndex ->
39
optionFrom({ 0..min(it.maxPerTurn, it.piles[pileIndex]) }) {amount ->
0 commit comments