I use unsigned ints representing a bunch of airplanes in a game. Each plane has two states, flying and grounded. I would like to store this state together with the planes number. What is the "best" way to achieve that? I could use std::maps with the planes and their state in it but that seems overkill and slow. Could it be done using bit flags ? The assigning and testing of the test should be quick.
Pseudo code:
unsigned int Boing = 777;
if( Boing is flying)
set some bit;
is Boing flying? (how to check for the current state)
Any hint on a simple and fast technique is appreciated!