08-09-2020, 04:55 PM
(This post was last modified: 08-09-2020, 05:01 PM by dale walton.)
Documentation shows:
(square (poly { { 1 2} { 1 6 } { 3 6 } { 3 4 } { 4 4 } { 4 2 } })) as arguments for (board ...
My code:
(define "Order2" (poly { { 1 3 } { 2 2 } { 4 1 } { 5 2 } { 6 4 } { 5 5 } { 3 6 } { 2 5 } } ))
(option "Board Size" <Board> args:{ <ord> }
{
(item "Muster 2" <"Order2"> "Board: Muster order 2 board - 20 positions")*
...
}
(game "Make Muster"
(players 2)
(equipment
{(board (square <Board:ord> diagonals: Solid))
...
Result:
language.compiler.exceptions.CompilerException: Unexpected syntax '(square (poly {{1 3} ...' in '(board (square (poly {{1 3} {...'.
What went wrong?
I also had problems with the below, where <Board:ord> was an integer:
//(define "BoardShape"
// (poly
// {
// { 1 (+ 2 <Board:ord>) }
// { 2 (+ 1 <Board:ord>) }
// { (* 2 (+ 2 <Board:ord>)) 1}
// { (+ 1 (* 2 (+ 2 <Board:ord>))) 2 }
// { (* 3 <Board:ord>) (* 2 (+ 2 <Board:ord>)) }
// { (- (* 3 <Board:ord>) 1 ) (+ 1 (* 2 (+ 2 <Board:ord>))) }
// { (+ 2 <Board:ord>) (* 3 <Board:ord>) }
// { (+ 1 <Board:ord>) (- (* 3 <Board:ord>) 1 ) }
// }
// )
//)
poly didn't treat the result of an addition as an integer in the integer pairs:
Failed to parse game description:
* Unexpected syntax '(+ 2 2)' in '{1 (+ 2 2)}'.
Unexpected syntax '(+ 2 2)' in '{1 (+ 2 2)}'.
language.compiler.exceptions.CompilerException: Unexpected syntax '(+ 2 2)' in '{1 (+ 2 2)}'.
(square (poly { { 1 2} { 1 6 } { 3 6 } { 3 4 } { 4 4 } { 4 2 } })) as arguments for (board ...
My code:
(define "Order2" (poly { { 1 3 } { 2 2 } { 4 1 } { 5 2 } { 6 4 } { 5 5 } { 3 6 } { 2 5 } } ))
(option "Board Size" <Board> args:{ <ord> }
{
(item "Muster 2" <"Order2"> "Board: Muster order 2 board - 20 positions")*
...
}
(game "Make Muster"
(players 2)
(equipment
{(board (square <Board:ord> diagonals: Solid))
...
Result:
language.compiler.exceptions.CompilerException: Unexpected syntax '(square (poly {{1 3} ...' in '(board (square (poly {{1 3} {...'.
What went wrong?
I also had problems with the below, where <Board:ord> was an integer:
//(define "BoardShape"
// (poly
// {
// { 1 (+ 2 <Board:ord>) }
// { 2 (+ 1 <Board:ord>) }
// { (* 2 (+ 2 <Board:ord>)) 1}
// { (+ 1 (* 2 (+ 2 <Board:ord>))) 2 }
// { (* 3 <Board:ord>) (* 2 (+ 2 <Board:ord>)) }
// { (- (* 3 <Board:ord>) 1 ) (+ 1 (* 2 (+ 2 <Board:ord>))) }
// { (+ 2 <Board:ord>) (* 3 <Board:ord>) }
// { (+ 1 <Board:ord>) (- (* 3 <Board:ord>) 1 ) }
// }
// )
//)
poly didn't treat the result of an addition as an integer in the integer pairs:
Failed to parse game description:
* Unexpected syntax '(+ 2 2)' in '{1 (+ 2 2)}'.
Unexpected syntax '(+ 2 2)' in '{1 (+ 2 2)}'.
language.compiler.exceptions.CompilerException: Unexpected syntax '(+ 2 2)' in '{1 (+ 2 2)}'.