12-06-2020, 02:30 PM

This question is related to my attempt on implementing classic board games on boards with non-trivial topologies.

When I define a (board (square ...)) or (board (rectangle ...)), I see that I get faces and compass directions, orthogonal and diagonal directions, opposite directions etc. automatically. So for example, to implement chess, I can easily tell a rook or bishop how to move. So far, so good.

If I implement a custom board, either by building up a graph from scratch, or by adding edges to an existing graph (such as closing a square to form a cylinder), is there any possibility to manually assign a direction to new edges? For example, on a chess board, when I connect the sites H1 and A1 to each other, can I somehow implement that A1 is East of H1 and H1 is West of A1? The same also with diagonals, like H1 to A2 pointing Northeast. In addition, would such a diagonal edge be recognized as continuing straight on B3, C4, etc.?

From as far as I have understood the board construction algorithm (please correct me if I'm getting it wrong), I could not see such a possibility. It seems that Ludii assigns (Euclidean) coordinates to each site and calculates compass directions automatically from the relative coordinate values. So if A1, B1, ..., H1 is walking East, then A1 cannot possibly be East of H1 in Euclidean space.

When I define a (board (square ...)) or (board (rectangle ...)), I see that I get faces and compass directions, orthogonal and diagonal directions, opposite directions etc. automatically. So for example, to implement chess, I can easily tell a rook or bishop how to move. So far, so good.

If I implement a custom board, either by building up a graph from scratch, or by adding edges to an existing graph (such as closing a square to form a cylinder), is there any possibility to manually assign a direction to new edges? For example, on a chess board, when I connect the sites H1 and A1 to each other, can I somehow implement that A1 is East of H1 and H1 is West of A1? The same also with diagonals, like H1 to A2 pointing Northeast. In addition, would such a diagonal edge be recognized as continuing straight on B3, C4, etc.?

From as far as I have understood the board construction algorithm (please correct me if I'm getting it wrong), I could not see such a possibility. It seems that Ludii assigns (Euclidean) coordinates to each site and calculates compass directions automatically from the relative coordinate values. So if A1, B1, ..., H1 is walking East, then A1 cannot possibly be East of H1 in Euclidean space.