|
|
|
@ -13,7 +13,7 @@
|
|
|
|
|
(fn lateral? [direction]
|
|
|
|
|
(. {:w true :e true} direction))
|
|
|
|
|
|
|
|
|
|
(fn try-to-drive [{: x : y : direction : stopped} distance]
|
|
|
|
|
(fn try-to-drive [{: x : y : direction} distance]
|
|
|
|
|
(let [distance
|
|
|
|
|
(if (lateral? direction)
|
|
|
|
|
(/ distance (math.cos (/ (* math.pi y) 180)))
|
|
|
|
|