Matthew wrote
Just on the topic of flags, what is the point of a flag? What is it designed to do?
Facetious answer is 'whatever you want it to do'.
In fact you use flags as a convenient way to keep track of things during a game.
Say that you need your player to turn on the water supply to a hose before he can use the hose to extinguish a fire.
When the player turns on the water during the game you could (in code) set a flag called 'water_available'. Now you have a nice convenient way to test whether the player can fight the fire by checking to see if the flag 'water_available' is set. If set your player can fight the fire if not he can't.
'water_available' is thus indicating a true/false (or yes/no) state and is a sort of "signal flag" to the status of the water supply - so we call it a 'flag'
Hope that helps,
Al