The Magic the Gathering Comprehensive Rules are a fun read: https://blogs.magicjudges.org/rules/cr/
It's in English rather than computer code, but it sets out the data model and game loop in a way that should feel pretty familiar to programmers.
I’d be deeply surprised if a webapp requiring Next.js doesn’t have a state machine in any components.
If you’re past the complexity threshold for Next.js, you’ve run into what’s really probably the most fundamental construct in computing.
They’re not that complex. They’re just presented in academic language.
If you can program professionally, you’re very capable of self-studying a bachelor’s degree’s worth of CS.
Re:UI = F(statesⁿ)
by danielheath on Saturday February 17, 2024 @02:45AM
(#39407324)
To me, it's a lot clearer how to deal with a traditional ecommerce database setup like Northwind Traders (https://en.wikiversity.org/wiki/Database_Examples/Northwind). I've had to do that many times and know how to model such a thing.
I have no idea how to start modeling the state for a game like Wingspan (https://boardgamearena.com/gamepanel?game=wingspan), much less something more complicated, like Magic: The Gathering, where any of several tens of thousands of cards can interact with each other in novel ways, maybe even leading to infinite loops and such. In my mind it's like a giant if-then flowchart with a billion flows. I wish I could see the source code for the rules engine of such a thing, but with a step-by-step tutorial...