0
\$\begingroup\$

I am working on J2ME. I have got a canvas, with a layout of a Checkers board. At the position of pieces, I have placed images. The point at which I got stuck is, how to select/highlite a piece's image for a move. I can't figure out the appropriate commandListener and how to handle this keyPressedEvent. I understood the logic of this game from: Draughts AI

Any suggestions?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

there's always an array like DS representing the chess, always a current position, always a target position. always highlight the current position. after press a button, you change the status of the chess, and then you select another position ..... basically what I suggested is you need to think in state machine based model.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .