Problem solved where program's restart on every turn