     (and (not (= @last-boost-value "SHIELD")) (not (= @last-boost-value "BOOST")) (= @last-shield-usage 0))))
 
 (defn use-shield? [x y opponent-x opponent-y boost-used? game-loop-counter max-shield-usage last-shield-usage last-boost-value]
-  (and (= @last-shield-usage 0) (> @game-loop-counter 10) (> @max-shield-usage 0) (< (distance opponent-x opponent-y x y) 700)))
+  (and (= @last-shield-usage 0) (> @game-loop-counter 10) (> @max-shield-usage 0) (< (distance opponent-x opponent-y x y) 1000)))
 
 ;;Compute BOOST, SHIELD or boost value between 0 and 100
 (defn compute-action [next-checkpoint-x next-checkpoint-y next-checkpoint-distance next-checkpoint-angle x y opponent-x opponent-y boost-used? game-loop-counter max-shield-usage last-shield-usage last-boost-value]
   (cond
     (use-boost? next-checkpoint-distance next-checkpoint-angle boost-used? game-loop-counter last-shield-usage last-boost-value) (do (reset! boost-used? true) "BOOST")
-    (use-shield? x y opponent-x opponent-y boost-used? game-loop-counter max-shield-usage last-shield-usage last-boost-value) (do (reset! last-shield-usage 3) (swap! max-shield-usage dec-atom) "SHIELD")
+    (use-shield? x y opponent-x opponent-y boost-used? game-loop-counter max-shield-usage last-shield-usage last-boost-value) (do (reset! last-shield-usage delay-between-shield-use) (swap! max-shield-usage dec-atom) "SHIELD")
     true (compute-boost next-checkpoint-distance next-checkpoint-angle)))
 
 (defn -main [& args]

        ; You have to output the target position
        ; followed by the power (0 <= thrust <= 100)
        ; i.e.: "x y thrust"
        (print nextCheckpointX)
        (print " ")
        (print nextCheckpointY)
        (print " ")
        (reset! last-boost-value
                (compute-action

(ns Player
  (:gen-class))

(def checkpoint-core-size 100)
(def delay-between-shield-use 10)

(defn inc-atom [curr-val] (inc curr-val))
(defn dec-atom [curr-val] (dec curr-val))
