I am writing a chess game and I need to set the property self.selected of every instance of a chess piece (except the instance of the chess piece I have just clicked) equal to False when a chess piece is clicked and thus self.selected is set to True.
I think the problem is that I am binding left mouse click to the object after it is drawn in the super class and so I can't return to a global function which can manage the different instances externally.
Basically (in case i am going about this all wrong), I have my chess pieces, and when I click one it's property self.selected becomes True. I need to set that property to False again if a different chess piece is selected or if that same chess piece is clicked again.