Add some functions to game.class.php