Page 1 of 1

Complex game/machine states

Posted: 24 July 2017, 09:16
by docthib
Hey everyone,

In many 'advanced' games there are some actions that may call other players actions that may call another players action etc... (in Seasons for example) and I'm wondering how to build a clean state file with this kind of mechanic ?
Because registering each possible case manually just sounds super dirty.

Thanks for sharing :)

Re: Complex game/machine states

Posted: 25 July 2017, 00:04
by Victoria_La
I did that for Madera, but I would say "don't do it at home", this is extremely messy and complex to do everything with server states.
Basically I did a state stack. You push the state on the stack, then you pop it from the stack to get to previous state,
but I would never do it again. If you want to see this mess you can get read only access to source by clicking on that game in projects list.

What I did in Russian Railroads and Lewis & Clark is client states, its SO MUCH better as cleanness of code goes.
I have recipe for this documented here: http://en.doc.boardgamearena.com/BGA_St ... ent_States

Re: Complex game/machine states

Posted: 25 July 2017, 22:35
by docthib
Oh ! interesting ! Gonna give it a look (to games), and thanks for the link.

Building such clients states doesn't have an impact on replays ?
I think I need to work a bit more on states to fully understand it.