12-21-2020, 12:58 AM
Thanks to all commenters so far.
Re: but that uses (if ...) instead of (map ...):
Yes, a chain of if's is probably the way to go but will be a bit of a nuisance with a selectable number of players.
For the developers:
This is a pretty basic game concept that the language should provide for and the documentation for map and path both talk about role to role maps and illustrate a case for player roles mapping to player roles (but no context.)
The logic guide also says map converts them to integers. The problem is, then, what converts them back; or else, why isn't a map integer for a player role acceptable syntax - can't the compiler go back and check what kind of mapping it is, and if not, then what is the purpose of the map role-to-role - do I need to assign the result to a variable to pass the syntax checking, or is the value actually incompatible with the value that the (id ... ) requires? And in the end, why doesn't (player (...)) turn the map "integer" (if that is what comes out of map) back into something useful?
----------------------------------------------------------------------
Re: Pretty sure (prev) gives the player who last made a move, yes....
in addition to (prev) documentation being unhelpful, in the 14.3.4 Role type documentation this is misleading:
Prev : Player who moved on prior turn
Should be: Player who made the previous decision move
(unless it actually is player who made the previous decision or consequence move - for example what happens after a (then after a (set Player ) consequence?)
Re: What about (+ 1 (% (+ 1 (mover)) 3))?
That kind of approach is what I tried first but more generalized for multi-players. I just tried yours both with and without (player (...)) around it but still getting syntax error in for:
(id "Disc" (+ 1 (% (+ 1 (mover)) 3)))
and for:
(id "Disc" (player (+ 1 (% (+ 1 (mover)) 3))))
Re: but that uses (if ...) instead of (map ...):
Yes, a chain of if's is probably the way to go but will be a bit of a nuisance with a selectable number of players.
For the developers:
This is a pretty basic game concept that the language should provide for and the documentation for map and path both talk about role to role maps and illustrate a case for player roles mapping to player roles (but no context.)
The logic guide also says map converts them to integers. The problem is, then, what converts them back; or else, why isn't a map integer for a player role acceptable syntax - can't the compiler go back and check what kind of mapping it is, and if not, then what is the purpose of the map role-to-role - do I need to assign the result to a variable to pass the syntax checking, or is the value actually incompatible with the value that the (id ... ) requires? And in the end, why doesn't (player (...)) turn the map "integer" (if that is what comes out of map) back into something useful?
----------------------------------------------------------------------
Re: Pretty sure (prev) gives the player who last made a move, yes....
in addition to (prev) documentation being unhelpful, in the 14.3.4 Role type documentation this is misleading:
Prev : Player who moved on prior turn
Should be: Player who made the previous decision move
(unless it actually is player who made the previous decision or consequence move - for example what happens after a (then after a (set Player ) consequence?)
Re: What about (+ 1 (% (+ 1 (mover)) 3))?
That kind of approach is what I tried first but more generalized for multi-players. I just tried yours both with and without (player (...)) around it but still getting syntax error in for:
(id "Disc" (+ 1 (% (+ 1 (mover)) 3)))
and for:
(id "Disc" (player (+ 1 (% (+ 1 (mover)) 3))))