找回密码
 中文实名注册
查看: 162|回复: 0

tanchishe

[复制链接]

8

主题

26

帖子

683

积分

高级会员

Rank: 4

积分
683
发表于 2023-6-11 17:22:56 | 显示全部楼层 |阅读模式
snack_list = [[400,400],[420,400],[440,400],[460,400],[480,400]]

for position in snack_list:
    print(position)
if event.type == pygame.KEYDDWN:
    if event.key == pygame.K_UP:
        direction='up'
    if event.key == pygame.K_DOWN:
        direction='down'
    if event.key == pygame.K_LEFT:
        direction='left'
    if event.key == pygame.K_RIGHT:
        direction='right'

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )

GMT+8, 2024-4-30 10:02 , Processed in 0.040801 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表