I'm trying to make a very simple Othello iteration with Tkinter and Python and have an idea however I don't know a method to retrieve which button is pressed (through an integer?). I have a made a grid of buttons using
for x in range(8):
for y in range(8):
btn = Button(frame)
buttons.append(btn)
btn.grid(column=x, row=y, sticky=N+S+E+W)
btn.config(bg='green2')
I'm planning to config buttons on press and check all 8 directions by adding and subtracting the values of the buttons to find the button the the left (-8), upper right (+7), etc. I'm very new to coding and would like any feedback, thank you.