 
 (deftest test-player-move
   (are [pos action] (= pos (-> (example-game)
-                               (player-move action)))
+                               (run-player-action action)
+                               (player-position)))
                     [3 3] :right
                     [1 3] :left
                     [2 2] :up

(defn player-fire-times [game n]
  (last (take (inc n) (iterate #(run-player-action % :fire) game))))

(defn step-times [game n]
  (last (take (inc n) (iterate run-zombie-actions game))))

(defn player-move [game action]
  (-> game
      (run-player-action action)
      (run-zombie-actions)
      (player-position)))

(deftest test-action->coords-only-allows-directions
  (is (thrown? #?(:clj  AssertionError

  (let [game (-> (example-game)
                 (configure-zombie-weapon [1 2] {::weapon/recharge-delay 0})
                 (configure-zombie-weapon [0 2] {::weapon/recharge-delay 0})
                 (run-zombie-actions-times 6))]
    (is (nil? (player-health game)))
    (is (nil? (player-position game)))))

