i'm trying to create a chess simulator.
consider this scenario:
there is a black rook (instance object of Rook class) in square 2B called rook1.
there is a white rook in square 2C called rook2.
when the player moves rook1 to square 2C , the i should remove rook2 object from memory completely.
how can i do it?
P.S. i'v already tried del rook2 , but i don't know why it doesn't work.