Completed basic game loop