Hey,
I'm trying to make a text-based simple virtual pet in c++. very basic, i'm just trying to get the skeleton of it at the moment. The problem I am having is increasing the likliness of the pet performing a good action the higher a number is.
For example, i have a class and good = 20, and bad = 10. Good is 10 more than bad, so i want the more of a difference there is, the more likely the pet will perform an action you ask, i.e sit. Also the other way around. If bad is more, it is more likely the dog will disobey.
I've been trying random mathematical ways but I can't get what i want. To me it seems pretty much impossible, but I don't know much. Could someone please help/point me in the right direction? thanks.