Language
Python
Compiler
CPython 3.12.1
Options
$ python3 prog.py
自 ゆうしゃ: HP=30
敵 スライム: HP=10
敵 ゴブリン: HP=20
----------
ゆうしゃのターン
0: 攻撃
1: 回復
どうする?>
Traceback (most recent call last):
File "/home/jail/prog.py", line 209, in <module>
battle.start()
File "/home/jail/prog.py", line 86, in start
self.player_turn()
File "/home/jail/prog.py", line 110, in player_turn
command = commands[ask_int("どうする?> ", 0, len(commands) - 1)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jail/prog.py", line 138, in ask_int
value = int(input(prompt))
^^^^^^^^^^^^^
EOFError: EOF when reading a line
Exit Code:
1