Checkers Game
Please help.
I am building a checkers game in Java. How do i get all possible capturing paths that a piece can make..
Please help me on this.. any reply would be appreciated.
[187 byte] By [
thegenius] at [2007-11-11 7:38:51]

# 1 Re: Checkers Game
well i'm assuming you're using a two dimensional array on the board?
well just check to see if there is a piece diagonal to it, in the direction the piece is moving. if there is, check to see if the next diagonal is empty, if it is, you can move.
p - piece were checking
t - taken by opposite color
e - empty
___ ___ ___ ___ ___
| e?| | | | e?|
|___|___|___|___|___|
| | t?| | t?| |
|___|___|___|___|___|
| | | p | | |
|___|___|___|___|___|
it's kind of hard to help you because you didn't explain how you were making it.
destin at 2007-11-11 22:37:42 >
