Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. (define (king x1 y1 x2 y2)
  2. (if (= y1 7)
  3. (if (< (abs (- x1 x2)) 2) #t (if (and (>= 5 (- (abs (- x1 x2)) 1)) (< y2 8)) #t #f))
  4. (if (< (+ y1 1) y2)
  5. #f
  6. (if (< y1 (abs (- x1 x2 )))
  7. #f
  8. #t))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement