第 8 步:我们现在准备创建我们的网络!我们知道 x 坐标是 90,但每次都会对 y 坐标感到惊讶!

  • 单击图形,然后单击并将Sprite at Position
  • 将图像标签从"codester"更改为"soccernet"
  • 将 x 坐标从0更改为netx ,将 y 坐标从0更改为nety

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_axis(100) stage.create_grid_overlay(10, "grey") stage.set_background("soccerfield") ballx = -80 bally = random.randint(-100,100) # sprite = codesters.Sprite("image", x, y) ball = codesters.Sprite("soccerball", ballx, bally) netx = 90 nety = random.randint(-100,100)
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)