refactor game initialization and loop to its own component (game.c)