Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.