02-25-2021, 12:26 AM
I am trying to implement Teeko. In my .lud file, I am using two phases, the first for the drops and the second for the moves once all the pieces have been dropped.
However, whenever I try and play a game (or have two AIs play each other), once all the pieces are dropped, it the player immediately shows both players as passing and then the game is over with no winner. I've tried several approaches (and since I was too lazy to put the code in git, I can't easily reconstruct it![[Image: confused.png]](https://ludii.games/forums/images/smilies/confused.png)
Here's my code:
However, whenever I try and play a game (or have two AIs play each other), once all the pieces are dropped, it the player immediately shows both players as passing and then the game is over with no winner. I've tried several approaches (and since I was too lazy to put the code in git, I can't easily reconstruct it
![[Image: confused.png]](https://ludii.games/forums/images/smilies/confused.png)
Here's my code:
Code:
(game "Teeko"
(players 2)
(equipment
{
(board (square 5))
(hand Each)
(piece "Ball" Each)
}
)
(rules
(start (place "Ball" "Hand" count:4))
phases:{
(phase "Placement"
(play (move (from (handSite Mover)) (to (sites Empty))))
(nextPhase Mover ("HandEmpty" Mover) "Movement")
)
(phase "Movement"
(play (move step (to if:(is Empty (to)))))
)
}
(end (if (is Line 4) (result Mover Win)))
)
)
(metadata
(graphics {
(player Colour P1 (colour Red))
(player Colour P2 (colour Black))
})
)