Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (king x1 y1 x2 y2)
- (if (= y1 7)
- (if (< (abs (- x1 x2)) 2) #t (if (and (>= 5 (- (abs (- x1 x2)) 1)) (< y2 8)) #t #f))
- (if (< (+ y1 1) y2)
- #f
- (if (< y1 (abs (- x1 x2 )))
- #f
- #t))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement