11-13-2020, 03:41 AM
(11-12-2020, 10:09 AM)cambolbro Wrote: Here's a 3x3x3 version of Tic-Tac-Toe using layers:I loaded this test of the (layers ...) ludeme .lud file.
(game "Graph Test - Layers (Square, 3x3)"
(players 2)
(equipment {
(board
(layers 3 (square 3))
)
(piece "Disc" P1)
(piece "Cross" P2)
})
(rules
(play (move Add (to (sites Empty))))
(end (if (is Line 3) (result Mover Win)))
)
)
<snip>
To be honest, the (layers ...) mechanism is largely untested, please let us know if you find any glitches or ways to improve it.
Regards,
Cameron
It compiles ok but doesn't play well.
There is no way to pick the layer for your move. It plays on layer 0 if the location on the 3x3 square is blank. You can then play over it, but only on layer 1. If a piece is on layer 0 and layer 1, then you can play on layer 2 at that location.
Random will play on Random layers.
There needs to be an isometric view of the 3D game board, and a way to keyboard enter a move.
In playing the game, I created a diagonal win on A3/0 + B3/1 + C/2 but the Ludii player didn't recognize the win. It looks like the (is Line 3) boolean function only looks at lines within a layer and does not consider lines going UW, DE, etc.
So, yes, the implementation of the (layers ...) ludeme needs work. Please let me know if there is something I can do to help. I understand if this is a "back burner" low priority item since your focus is on historic games, which did not use 3D game boards.
Best Regards,
Woody
Woody