         (get-in state [:world :viewport])]
     [v-width v-height]))
 
+(defn xy-in-viewport?
+  [state x y]
+  (let [{v-width     :width
+         v-height    :height
+         {v-x :x v-y :y} :pos}
+        (get-in state [:world :viewport])]
+        
+    (xy-in-rect? x y v-x v-y)
+                     v-width v-height))
+
 (defn xy-in-safe-zone?
   "Is `(x,y)` in the viewport bounds defined in the viewport in `state`?"
   [state x y]

  (let [{v-width     :width
         v-height    :height}
        (get-in state [:world :viewport])]
    (keyword (format "%d_%d" (int (/ x v-width)) (int (/ y v-height))))))

(defn get-place
  [state x y]

  (let [{v-width     :width
         v-height    :height}
        (get-in state [:world :viewport])
        [px py]      place-id]
    [(* px v-width) (* py v-height)]))

(defn +xy
