back

by lerno·7y ago·view on hn ↗
Been exactly there with a game. Solution? Take a data centered approach: a command object (just a function really) updates HP, XP, triggers visual effects etc. Monster and Player classes are just thin wrappers around plain data structures.

I tried the more ”OO”-approaches for all too long thinking it would lead me right. It doesn’t.