Update game.c

Fixed error checking