08-06-2020, 06:13 PM
(This post was last modified: 08-06-2020, 06:15 PM by AlekErickson.)
Thanks for your detailed response last time. The program you sent didn't compile, but with the new release and some discussion with Cameron we got it to compile, however there are way more issues. Now, while the code seems to sometimes recognize lines of sight , other times it does not , making certain legal placements not legal (or at least they are too slow to happen). Also , the scoring is not working. I want the game to count points for every neighbor to the last placed stone of their color, and also the person who made the final move should get 1 point.
Here is the current code.
(game "Trike"
(players 2)
(equipment
{
(board (hex triangle 5))
(piece "Ball" Each)
}
)
(rules
(meta (swap))
(play
(if (= (count Moves) 0)
(move Add (to (sites Empty)))
(move Add (to (sites LineOfSight Farthest at:(last To))))
)
)
(end
(if
(no Moves Next)
(byScore
{
(score P1 (count Neighbours at:(last To)))
(score P2 (count Neighbours at:(last To)))
}
)
)
)
)
)
I should say - your code did compile, but it was not possible to place stones on the board at the time.
- the way it is not working is that it does not actually count any score at all, as far as I can tell.
Here is the current code.
(game "Trike"
(players 2)
(equipment
{
(board (hex triangle 5))
(piece "Ball" Each)
}
)
(rules
(meta (swap))
(play
(if (= (count Moves) 0)
(move Add (to (sites Empty)))
(move Add (to (sites LineOfSight Farthest at:(last To))))
)
)
(end
(if
(no Moves Next)
(byScore
{
(score P1 (count Neighbours at:(last To)))
(score P2 (count Neighbours at:(last To)))
}
)
)
)
)
)
I should say - your code did compile, but it was not possible to place stones on the board at the time.
- the way it is not working is that it does not actually count any score at all, as far as I can tell.