回答編集履歴
1
回答文の改善
answer
CHANGED
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
`co` が None (他の言語でいう null) なのは明らかにおかしいので、今回のエラーが発生した場所ではなく、`co` を格納した部分に問題がありそうです。
|
4
4
|
|
5
|
-
ではその `co` はどこから来てるというと、192行目付近の `co = self.coords()` で `self.coords()` の結果を格納しています。
|
5
|
+
ではその `co` はどこから来てるというと、192行目付近の `co = self.coords()` で `self.coords()` の結果を格納しています。
|
6
6
|
|
7
7
|
```python
|
8
|
+
co=self.coords()
|
9
|
+
```
|
10
|
+
|
11
|
+
では `self.coords()` は何を返しているかを追ってみると、177行目の `def coords(self):...` で始まる関数がそれです。
|
12
|
+
|
13
|
+
```python
|
8
14
|
def coords(self):
|
9
15
|
xy=self.game.canvas.coords(self.image)
|
10
16
|
self.coordinates.x1=xy[0]
|