game class, gameloop