File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 101101 still if no such move exists."
102102 [ship destination]
103103 (let [ship-position (:position ship)
104- unsafe-moves (get-unsafe-moves ship-position destination)
104+ destination-position (:position destination)
105+ unsafe-moves (get-unsafe-moves ship-position destination-position)
105106 dir (reduce
106107 (fn [_ direction]
107108 (if (is-empty?
Original file line number Diff line number Diff line change 33 [com.taoensso/timbre " 4.10.0" ]
44 [org.clojure/data.json " 0.2.6" ]]
55 :source-paths [" hlt/lib" " hlt/app" ]
6+ :test-paths [" test" ]
67 :main MyBot
78 :aot [MyBot]
89 :uberjar-name " MyBot.jar" )
Original file line number Diff line number Diff line change 1+ (ns hlt.game-map-test
2+ (:require [clojure.test :refer :all ]
3+ [hlt.ship :as ship]
4+ [hlt.player :as player]
5+ [hlt.shipyard :as shipyard]
6+ [hlt.game-map :refer :all ]))
7+
8+ (deftest test-naive-navigate
9+ (with-redefs [game-map (fn [] {:width 32 :height 32 })
10+ ]
11+ (let [ship {::ship/id 1 ::player/id 0 :position [8 10 ] :halite 100 }
12+ shipyard {::shipyard/id -1 ::player/id 0 :position [8 16 ]}
13+
14+ ]
15+ (is (= [0 1 ] (naive-navigate ship shipyard)))
16+ )))
You can’t perform that action at this time.
0 commit comments