回答編集履歴

3

FIX

2022/06/05 03:30

投稿

退会済みユーザー
test CHANGED
@@ -9,10 +9,11 @@
9
9
  def update():
10
10
  global a
11
11
  global direction
12
- a += direction
12
+ a += 1 * direction
13
+
13
- if a > 200:
14
+ if a >= 200:
14
15
  direction = -1
15
- elif a < 0:
16
+ elif a <= 0:
16
17
  direction = 1
17
18
 
18
19
  def draw():

2

FIX

2022/06/05 03:26

投稿

退会済みユーザー
test CHANGED
@@ -9,11 +9,12 @@
9
9
  def update():
10
10
  global a
11
11
  global direction
12
+ a += direction
12
13
  if a > 200:
13
14
  direction = -1
14
15
  elif a < 0:
15
16
  direction = 1
16
- a += direction
17
+
17
18
  def draw():
18
19
  global a
19
20
  pyxel.cls(7)

1

FIX

2022/06/05 03:23

投稿

退会済みユーザー
test CHANGED
@@ -9,12 +9,11 @@
9
9
  def update():
10
10
  global a
11
11
  global direction
12
- a += direction
13
12
  if a > 200:
14
13
  direction = -1
15
14
  elif a < 0:
16
15
  direction = 1
17
-
16
+ a += direction
18
17
  def draw():
19
18
  global a
20
19
  pyxel.cls(7)