moved some functions from playit_brain to game_framework