split game loop for #159

Per comments from #170