I'm implementing an online TCG game (think Hearthstone/Magic) as a pet project and I've decided to go React/Redux for the client UI. This led me to think about the possibility of using Redux on the server as well to maintain the global state for each client/game.
The way it would work, is players in a game would send events (via socket.io) to the server which would be validated according to the game state+rules, which would then trigger a change in the server state and propagate it to the respective clients.
The thing is, I feel like I'm gonna have to jump through a lot of hoops to get all the game rules/logic to conform to the more functional/immutable approach of Redux instead of modeling all my game entities as classes. Also, since each player has limited information about their opponents (you can't see the other player's hand for example), I'll have to have some custom logic for filtering the state information depending on which player is receiving the data.
On the other hand, I like the idea of having a centralized state split across different handlers for each domain, predictable data flow, and possibility to regress to prior states. Also the actions in Redux fit neatly into the command pattern which is useful for these kinds of games.
Should I just implement a custom Redux like state manager but drop the immutability part? Is there a more "tried and true" approach for these kinds of situations?