Closed DylanSp closed 4 months ago
I'm going with option 3 for convenience. I'll remove all current use of the Immutable
type.
Previous immutable style removed in https://github.com/DylanSp/deep-future/commit/b3a8f70e31dba57233cb457ce4cb2c93001696d6.
As of https://github.com/DylanSp/deep-future/commit/c97b9d23c8b4afcef8d5732fe6b0373ef72b0270, I'm making heavy use of Immer's
Immutable
type, and theDeck
type used for the game logic is fully immutable. This is somewhat inconvenient, since it requires threading the newDeck
value generated from each function through a lot of code. Immer doesn't really help with this, since I still have to use the non-mutating functions even insideproduce()
. I should decide how I want to handle it:fp-ts
and use the State monad to make the logic look smootherCampaign
/Game
types, where the rest of the app interacts with the game logic.