I am about to start writing a chess program using Tkinter/ Python and I am experimenting with coordinates for moves as I have never used them before. How can I get this code working as right now I get: NameError: name 'x' is not defined.Thanks in advance for the help.
movelist=[]
KNIGHTLIST=[(x+2,y+1),(x+2,y-1),(x-2,y+1),(x-2,y-1),(x+1,y+2),(x+1,y-2),(x-1,y+2),(x-1,y-2)]
index=0
pieceposition=(3,4)
newposition=(0,0)
for move in KNIGHTLIST:
newposition=pieceposition+KNIGHTLIST[index]
movelist.append(newposition)
index=index+1
print (movelist)