does somebody know a good “design pattern” to simplify this kind of code?
money!(player, money(player) + 100)
In other languages it would be something like this, via getters/setters:
player.money += 100
But I have no “money” attribute, only the methods to read/write the money. I thought about introducing a new type like “PlayerMoney”, which implements
money(player) += 100
Any ideas for a nice/short julian way?