| Author |
Message |
Harry Harris (Harry)
| | Posted on Monday, June 30, 2003 - 6:25 pm: | |
Hello, I'm a newbie, starting to look at zrf code. How can I create a blocker piece? E.g. each player has a blocker, which they can move, but which can't capture or be captured or be jumped over, i.e. it functions as a movable hole on the board. Thanks! Harry |
Jeff Mallett (Jeffm)
| | Posted on Monday, June 30, 2003 - 6:36 pm: | |
1) In the move code for the blocker piece, only allow it to move to empty positions. The "empty?" keyword tests if a position is empty. 2) In the move code for all other pieces, before allowing a capture, check to make sure it's not the blocker piece. For example, (if (not-piece? blocker) add) |
|