adds game stop function.