我正在用一本书学习如何用pygame编写python代码,所以我要写下代码。但是当我运行它时,它在revealedBoxes[boxx][boxy]=True上给了我一个语法错误
^
不知道是什么问题。如果你能帮忙,非常感谢
代码如下:
if boxx != None and Boxy != None:
if not revealedBoxes[boxx][boxy]:
drawHighlightBox(boxx, boxy)
if not revealedBoxes[boxx][boxy] and mouseClicked:
revealBoxesAnimation(mainBoard, [(boxx, boxy)]
revealedBoxes[boxx][boxy] = True
你把括号掉在这里了
这是一个有效的声明
除非在
while
,if
,…中用作表达式:你是说
==
更新
代码缺少
)
相关问题 更多 >
编程相关推荐