How do I implement collision detection?

后端 未结 2 680
清歌不尽
清歌不尽 2021-01-29 11:53
from graphics import*
import time
import random 

def main():

    numx=random.randint(10,700)

    wn=GraphWin(\"AK\",700,700)
    wn.setBackground(\"white\")

    msg=         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-29 12:04

    Your radius is twenty. Inside the loop, just test whether Euclidean distance between sqrg and blx is within 20.

提交回复
热议问题