Nov-12-2020, 09:30 PM
Hey! So I'm using Tkinter to make a GUI for Sudoku; just as a project to get better. Throughout my functions I am passing a variable for the sudoku square on the board/GUI, but that square belongs to one of 9 boxes (I didn't do the standard 9x9 matrix).
For example:
boxes[0].squares[4] would be the top left box and the left/center square. If I passed that object into a function simply as 'square,' could I figure out which box it belongs to within that function?? I was passing in both box and square but I'm trying to clean things up to make solving problems clearer.
Thanks so much. I feel like this is a simple thing but I don't know the proper wording so I couldn't find an answer by searching. I'm not even sure if attribute is the right word.
For example:
boxes[0].squares[4] would be the top left box and the left/center square. If I passed that object into a function simply as 'square,' could I figure out which box it belongs to within that function?? I was passing in both box and square but I'm trying to clean things up to make solving problems clearer.
Thanks so much. I feel like this is a simple thing but I don't know the proper wording so I couldn't find an answer by searching. I'm not even sure if attribute is the right word.