johnameyer / cards-ts

A card game framework and various games in Typescript. The framework allows for bot development and playing card games in the terminal or in a browser.
6 stars 2 forks source link

Reimplement the names mechanic #26

Open johnameyer opened 4 years ago

johnameyer commented 4 years ago

The names mechanism was removed in order to support the shared interface of all the Handlers methods but should be added back in a event-cognizant manner.

johnameyer commented 3 years ago

I've been trying to think this through in light of #42 and the fact our system is currently fully async. It makes sense to me to have a sort of rename event that can happen and change names (how does this work with old messages? onus on presenter?) and potentially splitting out the names state to be managed separately from the game state (can/should the game iterator have access to this? Would it have a separate reducer/merger?)... but I am not certain about how to handle the synchronous elements of needing a name upfront. If we go and implement a truer lobby (#8) would it be decided then? Or should it be decided before even joining a lobby?

johnameyer commented 8 months ago

At the moment, dynamic renaming seems like a future item - games like Jackbox do not support this at all. The best mechanism is likely to determine this at the time of joining the lobby.