new function in Field class, game loop code