I am learning python and this is my first experience programming with GUI. I am designing a card game in which I created a game object and graphics(tkinter) object. I designed the GUI so that when user select cards and hit submit button, the tkinter will store the selected indices and set a flag in its member variables. At the same time, I want the game object to poll the flag, if the flag is set, the game object will get selected indices and proceed to rule checking, updating, etc.
I am using a while loop in that polling and I realized that the tkinter is also using a loop somewhere so that if I run with my current code, one of the loops will be blocked(either the GUI not shown or the game not proceeding).
I could only think of using multi-threads to let the game and graphics run concurrently. But is this too complicated? is there a way to do it in a single thread or any other methods?
Thanks!