zelle グラフィックスを使用して、Python でルーレットの簡単なプログラムを作成しています。私は以下のコードを持っていて、これらの2つの円(トラック)の間にボールを移動しようとしています. それを行う方法はありますか。私の考えは、 unraw(ball.undraw()) して、.10 秒の時間間隔 (time.sleep(.10)) で再度描画することですが、数学的にそれを行う方法がわからないため、トラックを移動します.
from graphics import * def main(): win = GraphWin()
Circle1 = Circle(Point(100,100),95) #Makes the first Circle
Circle1.draw(win)
Circle2 = Circle(Point(100,100),80) #Makes the second Circle
Circle2.draw(win)
Ball = Circle(Point(100,12),5) #Makes the ball Circle
Ball.draw(win)
win.getMouse()
win.close()
主要()