| Author |
Message |
Steven Gustavson (Steven)
| | Posted on Sunday, November 18, 2001 - 5:56 pm: | |
Hello... I've been trying to set up a movement definition for a piece that I _thought_ would be very simple. Basically, the piece is supposed to move like a rook (no problem there). However, it also can jump any number of friendly or enemy pieces in its path, and continue onward. Finally, it has to end its movement only on empty spaces. So is this a complex problem or am I missing something simple here? |
Dan Troyka (Dtroyka)
| | Posted on Monday, November 19, 2001 - 7:34 am: | |
The following works when substituted for the "rook-slide" macro in Chess.zrf: (define rook-slide ((while (on-board? $1) $1 (if empty? add))) ) This means that the Rook can never capture (is that right?). |
Steven Gustavson (Steven)
| | Posted on Monday, November 19, 2001 - 5:41 pm: | |
Yes, that worked perfectly, thanks. I hadn't thought to use on-board for this one. On another note - I'm also trying to set up a game using drops. There are several pieces, each that need to be dropped. I don't want players to start dropping the second type of piece until the first are all dropped onto the board. It'd also be preferrable if no piece could move until all of the second were dropped. Hopefully this isn't an overly complex one either. |
Keith Carter (Keithc)
| | Posted on Monday, November 19, 2001 - 8:24 pm: | |
Sounds like a move priorities issue. But it looks like you have three classes (drop type 1, drop type 2, and regular movement) and move priorities is only good for two. A possible solution is the turn order. Define each of the drop types as a move type then have the turn order be a sequence of drops that ends with the repeat command followed by the normal turn order. |
|