質問編集履歴
1
書式の改善
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
### 前提・実現したいこと
|
|
2
|
-
|
|
2
|
+
```
|
|
3
3
|
RPGの対戦ゲームのようなものを作りたい
|
|
4
|
-
|
|
4
|
+
```
|
|
5
5
|
### 発生している問題・エラーメッセージ
|
|
6
|
-
|
|
6
|
+
```
|
|
7
7
|
player1.attack(player2)
|
|
8
8
|
TypeError: 'int' object is not callable
|
|
9
|
+
```
|
|
9
10
|
|
|
10
|
-
言語名:Python
|
|
11
|
-
|
|
12
11
|
#ソースコード
|
|
13
12
|
|
|
13
|
+
```python
|
|
14
14
|
import random
|
|
15
15
|
|
|
16
16
|
class RPGgame:
|
|
@@ -45,4 +45,5 @@
|
|
|
45
45
|
player2.attack(player1)
|
|
46
46
|
|
|
47
47
|
print(player1.status())
|
|
48
|
-
print(player2.status())
|
|
48
|
+
print(player2.status())
|
|
49
|
+
```
|