oakes / play-clj

A Clojure game library
The Unlicense
939 stars 73 forks source link

rectangle :contains returns int instead of boolean (always true) #82

Closed Antender closed 9 years ago

oakes commented 9 years ago

Are you sure? In a REPL, I get this:

=> (rectangle! (rectangle 0 0 10 10) :contains (rectangle 5 5 10 10))
false
Antender commented 9 years ago

I tried to use it like this:

(rectangle 
  card-x card-y 
  card-width card-height 
  :contains (game :x) (game :y))
oakes commented 9 years ago

Oh yeah that won't work. The rectangle macro will always return the rectangle object you are creating, so the return value of any methods you embed in it will be ignored.