我试图在存储位置的位置绘制 flag1:
turtle.setpos(positions[0][:2]) #MAKE A = 1
turtle.write('ABC', align='center', font=20)
turtle.dot(20, "blue")
occupied[0].append((positions[0][2], positions[0][3]))
flag1((positions[0][2], positions[0][3]))
但我收到以下错误
flag1((positions[0][2], positions[0][3]))
TypeError: flag1() missing 1 required positional argument: 'y'
该列表可以被视为:
positions = [
[-3*HORIZONTAL, 3*VERTICAL, 'A', 7],
[3*HORIZONTAL, 3*VERTICAL, 'G', 7],
[-3*HORIZONTAL, -3*VERTICAL, 'A', 1],
[3*HORIZONTAL, -3*VERTICAL, 'G', 1]
]
occupied = [ # To store the grid occupied
[('A', 7)],
[('G', 7)],
[('A', 1)],
[('G', 1)]
]
守着一只汪
相关分类