07-22-2022, 02:01 PM
I'm attempting to implement a stacking game with potentially very large stacks. Possible moves are also determined by a dice roll. But, if I initialize the dice and use the command
within the board, it is unable to correctly index which player occupies a site. I believe it is counting the shared dice as players as, if I run
it consistently outputs the player index + the number of dice. I've provided a minimal working example below.
Code:
largeStack:True
Code:
(who at:(site))
Code:
(define "Placement"
(priority {
(move Add (piece (id "Disc" Mover)) (to (sites Empty)))
(move Add (piece (id "Disc" Mover)) (to (sites Occupied by:Mover))
(then (if (= (count Turns) 10) (set Var "PlacementDone" 1)))
)
})
)
//-----------------------------------------------------------------------------------------------------------
(game "TestCode"
(players 6)
(equipment {
(board (square 3)
largeStack:True
)
(piece "Disc" Each)
(dice num:5)
})
(rules
(play (priority {
(if (= (var "PlacementDone") -1) "Placement")
}))
(end
(if
(= (var "PlacementDone") 1)
(result Next Draw)
)
)
)
)