| Author |
Message |
Mariano Moran Fougerat (Marianomf)
New member Username: Marianomf
Post Number: 29 Registered: 10-2013
| | Posted on Wednesday, November 06, 2013 - 3:24 am: | |
How can I define a nn position on a command? A piece was 2 squares north, how can I define it? |
Sean Duggan (Dream)
New member Username: Dream
Post Number: 92 Registered: 9-2000
| | Posted on Wednesday, November 06, 2013 - 4:42 am: | |
Ah, so you're trying to determine whether the piece was 2 steps north prior to your action? (my guess is that you're trying to implement En-Passant for the Squire) One way is, well, to add a new move which is two steps north, much like how you defined n. The easier way is to simply take an extra step north before checking the last-from? n. Or, alternately, take two steps north and then just use last-from? without a direction. |
Mariano Moran Fougerat (Marianomf)
New member Username: Marianomf
Post Number: 30 Registered: 10-2013
| | Posted on Wednesday, November 06, 2013 - 5:21 am: | |
Good guessing, thank u, i fixed it into this: (define En-Passant1 ( $1 (verify last-to?) (verify (or (piece? Pawn) (piece? Squire)) ) capture n n (verify (last-from? n)) s add ) ) |
Mariano Moran Fougerat (Marianomf)
New member Username: Marianomf
Post Number: 31 Registered: 10-2013
| | Posted on Wednesday, November 06, 2013 - 5:42 am: | |
And finally how can i define a in-zone loss condition, like if youre on the give up zone you lose |
|