Ludii Forum
Murus Gallicus - Slide To Problem - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Game Problems (https://ludii.games/forums/forumdisplay.php?fid=17)
+--- Thread: Murus Gallicus - Slide To Problem (/showthread.php?tid=650)



Murus Gallicus - Slide To Problem - Phil Leduc - 07-19-2021

I am trying to implement Murus Gallicus and Advanced Murus Gallicus. I've had some success with basic Murus Gallicus. AMG is very similar to MG but has catapults (stacks of 3). I am trying to use Slide to "throw" a stone two or three cells in forwards or lateral directions. It seems that the "to" conditions are not restricting target cells. Below is the code that I think is having a problem. Of course, the problem could be due to me, but after many hours trying I am starting to think something may be wrong because I am using using Slide with stacks. Below is the macro that I think is having the problem. I have also attached the complete lud file. You can just load the file and try moving one of the 3-stacks.

Thanks, Phil 

(define "ThrowStone"
        (move
          Slide
                (from if:(and (is Mover (who at:(from)))
                                ((= (size Stack at:(from)) 3))
                            ) 
                )                                     
                (directions {Forwards Rightward Leftward})
                (between (range 2 3) if:True )

                (to (sites Occupied by:NonMover))  // Problem: Still allows move to a mover stack
//                (to (sites Empty))              // Same Problem: Still allows move to a mover stack
                stack: False  // << One token moves, True all tokens move
        )
)


RE: Murus Gallicus - Slide To Problem - Phil Leduc - 07-31-2021

I have found a work around. By switching to Leap and breaking down the five forward and lateral directions into  two possibilities, the script started to work well. I have submitted my final results and hope to have Murus Gallicus added to the Ludii list of games.