【发布时间】:2022-06-10 23:59:19
【问题描述】:
我正在尝试使用 python turtle 和 制作一个四处移动的蠕虫 AI,但我不知道如何检测海龟窗口的边缘,因为它确实会避开它。请帮忙
【问题讨论】:
-
欢迎来到 SO!请分享更多关于你迄今为止尝试过的信息。
-
左边框:
warm_x < -width,右边框warm_x > +width等?你只需要知道width-width = turtle.window_width()/2
标签: python python-turtle