| Author |
Message |
Jianying Ji (Jianying)
| | Posted on Saturday, March 10, 2001 - 3:45 am: | |
Suppose you do (empty? n) on a position on the northernmost square, does it return false. It seems to, but I'm not 100% sure. So I'm posing it to you all |
Jeff Mallett (Jeffm)
| | Posted on Sunday, March 11, 2001 - 9:12 pm: | |
Yes, it returns false. The rule is this: A position-condition always returns false if the position is off the board. If you want a different behavior you can use (on-board? n) before doing your empty check. Note: "not-" type commands will return true because they are shorthand for using "not". For example, (not-empty n) is the same as (not (empty n)). Since (empty n) is returns false, (not (empty n)) and therefore (not-empty n) will be the logical negation of this, evaluating to true. |
|