improve game.c and fix warning