| Author |
Message |
Ken Franklin (Kenz)
| | Posted on Tuesday, October 28, 2003 - 7:50 pm: | |
I've been attempting TORI Shogi today (I found E.Werner's July 2000's file well after I started). However, I have been trying to modify the DROP conditions from zillions' SHOGI.zrf for allowing a drop only if there is fewer than 2 SWALLOWS (a piece that's like a Pawn) by using 2 flags. a partial code: (define drop-pawn-for-file (set-flag one-pawn false) (set-flag two-pawn false) ;newline mark (if (and friend? (piece? Swallow) ) (set-flag one-pawn true) ) (while (and (flag? one-pawn) (on-board? s)) ;only check S with 1 SWALLOW already s (if (and friend? (piece? Swallow)) ; check for another SWALLOW (set-flag two-pawn true) (set-flag one-pawn false) ) ) back (if (not-flag? two-pawn) ... add) ;THIS ADD is where the drop is completed ) Any suggestions (using this method)? |
Ken Franklin (Kenz)
| | Posted on Wednesday, October 29, 2003 - 8:29 am: | |
GOT It!. The IF -one-pawn line was only confirming the top row position on the grid. I needed to insert an extra While loop to move S when no-pawn(Swallow) exists on the initial row has well. Then the Two-pawn flag would be set accordingly. I feel as frustrated as when KONANE was released (I was just attempting it myself back in Dec '00/Jan '01). |
|