Magos provided a very good explanation of the bool, but I thought I would show you an example in C++ of how a bool can be used.
You said you were making a game. Well, most games have collision detection, or in other words, a way to tell when one object in the game hits another object in the game.
I will show you a very simple example of this:
Code:
bool CollisionOccurrance;
if ( Location ( ObjectA ) == Location ( ObjectB ) )
CollisionOccurrance = true;
else CollisionOccurance = false;
you are then able to use this variable CollisionOccurance in other parts of the code. For example, maybe you want the two objects to explode if they hit each other:
Code:
if ( CollisionOccurance == true ) ExplodeObjects ( ObjectA, ObjectB );
Of course, you could also write that same line of code like this:
Code:
if ( CollisionOccurrance ) ExplodeObjects ( ObjectA, ObjectB );
but since you are just learning how to use bools, use the first way which I showed you, unless you consider yourself smart enough to realize how the second way is done and how it works.
You might also want to do something if they did not collide. Maybe if they dont collide, you want to move each object to a different position on the screen. This can also be done at least two different ways:
Code:
if ( CollisionOccurrance == false ) MoveObjects ( ObjectA, ObjectB );
or this way:
Code:
if ( !CollisionOccurrance ) MoveObjects ( ObjectA, ObjectB );
Anyways, thats about all. I hope those code examples help out.