07-23-2020, 09:19 AM
I've implemented several versions of Chess in which I've chosen a seemingly flexible means of implementing the en passant feature. I store the last Pawn moved into Var, and the Cell or Cells jumped over by the previous Pawn into Pending. This looks something like:
This works when implementing en passant following a two-space Pawn advancement. But in a variant with a three-space Pawn advancement (specifically, Shafran Chess), I have not found a version that works. The most promising seems to be something like:
However, this is not valid Ludii syntax. The (ahead) ludeme returns an item of type Site, while Pending expects an argument of type "moves". I've made several attempts, but haven't a combination that works. Any ideas?
Thanks,
Jay
Code:
(then (and
(set Pending (ahead (last To) Backward))
(set Var (last To))
))
This works when implementing en passant following a two-space Pawn advancement. But in a variant with a three-space Pawn advancement (specifically, Shafran Chess), I have not found a version that works. The most promising seems to be something like:
Code:
(then (and
(set Pending
{
(ahead (last To) steps:1 Backward)
(ahead (last To) steps:2 Backward)
}
)
(set Var (last To))
))
However, this is not valid Ludii syntax. The (ahead) ludeme returns an item of type Site, while Pending expects an argument of type "moves". I've made several attempts, but haven't a combination that works. Any ideas?
Thanks,
Jay