jkomoros / boardgame

An in-progress framework in golang to easily build boardgame Progressive Web Apps
Apache License 2.0
31 stars 4 forks source link

base.SubState shoudl grow a SetStatePropertyRef #744

Closed jkomoros closed 4 years ago

jkomoros commented 4 years ago

And StatePropertyRef(). That will allow e.g. the token color helpers in #741 to be able to know what player index it's associated with.

It will also allow the weird behavior of PlayerSubState to be gotten rid of--base.SubState would just implement base.PlayerIndex() which would fetch the player index property and return it. That would then allow getting rid of that whole type (PlayerIndex() is never actually read back anywhere in the core library) and special behavior for Player index

jkomoros commented 4 years ago