Fixed #37, move game apis to seperate file