@sun@shitposter.world this code example is pretty bullshit but this is what basically the tcg guy explained to me that he had to discover with blood sweat and tears of creating multiple tcg engines that can handle basically infinite layers of added complexity without quickly combinatoricalling out
like if you think about how complex some of these card games can be, 3 turns ago a card was played that blocked an effect of this current card but then this card reverses a rule that was played last round so then your engine has to take this situation into account, you can't do this with a type hierarchy and it'd be hell with traits, the only solution is to really define out your state machine rigorously. before this guy explained it to me i never really considered how similar creating tcgs were to basically programming lol
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
受不了包 (shibao@misskey.bubbletea.dev)'s status on Saturday, 06-Apr-2024 02:05:31 JST受不了包