Ludii Forum
Direction function bug? - Printable Version

+- Ludii Forum (
+-- Forum: Problems (
+--- Forum: Grammar Problems (
+--- Thread: Direction function bug? (/showthread.php?tid=233)

Direction function bug? - Michael - 11-03-2020

On the dual of tiling T3636 these are the Adjacent directions:
[Image: pic5756381.png]
These are the Orthogonal directions:
[Image: pic5756382.png]
But this is (difference Adjacent Orthogonal):
[Image: pic5756380.png]
Why aren't 131 and 88 included in (difference Adjacent Orthogonal)?

I have attached a .lud where it is easy to test this for oneself.

Edit: Also compare Diagonal and something like (difference Diagonal N). (difference Diagonal N) returns many more directions than Diagonal.

RE: Direction function bug? - Eric Piette - 11-06-2020


I just looked that and thanks a lot for it ;)

The code I wrote in difference (directionFunction) was not taking in account the site and was looking only the different directions according to the board. But for a board with elements which does not have all the same equivalent facingDirections (N, E, NNW, etc...) for each AbsoluteDirection (Orthogonal, Adjacent, Diagonal, etc....) the results can be different by site.
Anyway, I just fixed it and it works in our dev version now.

We will publish that fix in the next release.

Once again, thanks for your report.