Hi everyone, I'm working on a checkers game, i have problem with piece movements, currently i have few classes which i will upload, but my main problem is that i can't move my piece to a new location within the board, I have it so that when a piece is clicked it position is checked, and the mouse listens to a new square that user clicks, if the square doesn't have a piece on it then a Boolean is set to true.
I really need an advice help of how i could go about moving the pieces to a new location within the board.
posted 4 years ago
one of the ways would be to have your board made up of JLabels, and the checkers as images/icons.
then, after your mouseclicks/move validation, you set the icon of the old label to null, and the
label of new location to that of the old label's icon.