4 ms·
How do you handle actions that are not enumerable? For example, in codenames where the spymaster has to give a clue which can be any english word
by hpx7 5y ago
How do you handle actions that are not enumerable? For example, in codenames where the spymaster has to give a clue which can be any english word
- 10000truths 5y agoEnglish words are enumerable. There’s just a few million of them. The dictionary is large, but it’s not like it changes frequently, so you can treat it like a static asset that gets downloaded once and only updated periodically out of band.
- reitzensteinm 5y agoThe specific example may be faulty but the general point absolutely is not. I've built turn based games where enumerating the space of actions grew at a x b x c and would have easily measured in the megabytes. It's just not a practical general solution, but it sure works fine for something like Monopoly.
- jayd16 5y agoYou don't need to be so literal. An action like "game action XYZ" with a client smart enough to know how to show a text field and enable submission is sufficient. The point is just every bit of logic about when an action is enabled must be implemented on the backend for verification, so spelling that out to the client reduces duplication.
- furyofantares 5y agoIn that case you would probably add a payload which you would then have to check, you're correct. It just turns out you can implement most board games without that. I do still like this system for some games with actions that aren't convenient to enumerate; it's safe and simple by default and you add validation only in exactly the places where you need a payload.