add the use of flags in game.cpp