There's so many variables in games. What I mean is, what happens in a game is varied like "if" this "then" this is the outcome. For example, you get a certain amount of xp points depending upon how much dmg. you inflicted, how quickly, etc. Or, another example, your weapon does this much damage depending on your stats but also depending on opponents stats. What I'm asking is, how are these variables defined in programming, by mathematics?