私の質問は紛らわしいように思えるかもしれませんが、それが私が考えられる唯一の言い回しです。混乱させて申し訳ありませんが、説明するために最善を尽くします。
基本的に私がやろうとしているのは、ゲーム内に「終了しますか?」と尋ねる単純な終了機能を持たせることです。ユーザーが「いいえ」と入力すると、元の関数に戻ります。
これが私がやろうとしたことですが、「bear_room()」関数にループバックしているようです。
def bear_room():
print "You are greeted by a bear"
next = raw_input()
if next == 'fight':
print 'You tried to fight a bear. You died'
elif next == 'exit':
exit_game(bear_room())
else:
print 'I did not understand that!'
bear_room()
def exit_game(stage):
print '\033[31m Are you sure you want to exit? \033[0m'
con_ext = raw_input(">")
if con_ext == 'yes':
exit()
elif con_ext == 'no':
stage
else:
print 'Please type ''yes'' or ''no'
exit_game()