   (:require [play-clj.core :refer :all]
             [play-clj.g2d :refer :all]))
 
+(def player-speed 10)
 
 (defn move [screen entity]
   (cond
     (= (:key screen) (key-code :dpad-up)) (if (<
-                                                (+ (:y entity) 30) 
+                                                (+ (:y entity) player-speed) 
                                                 (- 600 (:height entity)))
-                                            (assoc entity :y (+ (:y entity) 30))
+                                            (assoc entity :y (+ (:y entity) player-speed))
                                             (assoc entity :y  (- 600 (:height entity))))              
     (= (:key screen) (key-code :dpad-down)) (if (>
-                                                (- (:y entity) 30) 
+                                                (- (:y entity) player-speed) 
                                                 0)
-                                            (assoc entity :y (- (:y entity) 30))
+                                            (assoc entity :y (- (:y entity) player-speed))
                                             (assoc entity :y 0))         
     (= (:key screen) (key-code :dpad-right)) (if (<
-                                                (+ (:x entity) 30) 
+                                                (+ (:x entity) player-speed) 
                                                 (- 800 (:width entity)))
-                                            (assoc entity :x (+ (:x entity) 30))
+                                            (assoc entity :x (+ (:x entity) player-speed))
                                             (assoc entity :x  (- 800 (:width entity))))                 
     (= (:key screen) (key-code :dpad-left)) (if (>
-                                                (- (:x entity) 30) 
+                                                (- (:x entity) player-speed) 
                                                 0)
-                                            (assoc entity :x (- (:x entity) 30))
+                                            (assoc entity :x (- (:x entity) player-speed))
                                             (assoc entity :x 0))))
 
 

(defn move-boxes [boxes]
  (vec (map move-box boxes)))

(defn moving [entities]    
  (let [backgr (first entities)
        player (last entities)

                  []))]
    (conj (apply conj (conj [] backgr) boxes) player)))

(defn collision [entities]
  (let [backgr (first entities)
        player (last entities)
        boxes (try              
                (vec (drop 1 (drop-last entities)))                
                (catch NullPointerException e
                  []))]
    (if (has-collide player boxes)
      (throw (Exception. "Game over"))
      (conj (apply conj (conj [] backgr) boxes) player))))

(defscreen main-screen
  :on-show
