dnsbty / level10

Phoenix LiveView multiplayer card game
https://level10.games
MIT License
70 stars 2 forks source link

move game state to a vanilla genserver #68

Closed dnsbty closed 4 years ago

dnsbty commented 4 years ago

Currently game state is being stored in a somewhat customized Agent. This PR moves that state into a fully custom, vanilla Genserver.

Agents are great for storing state, but the customization was necessary when I wanted to implement custom termination logic. And with this change, the logic between server and client is able to be more fully separated so that it's more obvious what is running in the server versus what is running in the LiveView (and later channel) process. This will allow me to create more formal boundaries between domains.

Resolves #51