i am trying to write a game.
i have two classes. one is characters and one is weapons.
each character has a weapon. and the weapon needs to be able to affect the characters stats. how do i manage that?
i tried inheritance. having the weapon inherit from character so it could access the characters stats, but that only let me change the character class itself and not an instance of it.
anybody got a solution to this?