Skip to content
This repository was archived by the owner on May 20, 2021. It is now read-only.

Commit 5150fd0

Browse files
committedJun 19, 2019
More idiomatic naming
1 parent 14141e3 commit 5150fd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎snake.lisp

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
(with-slots (segments direction) snake
6262
(let* ((position (snake-position snake))
6363
;; The position of the next head.
64-
(new-head (gamekit:add position (direction-vec direction)))
64+
(new-head (gamekit:add position (direction-to-vec direction)))
6565
;; If we ate the food we do not chop off the end of the SEGMENTS.
6666
(which-segments (if ate-food-p segments (butlast segments)))
6767
(new-segments (push new-head which-segments)))

‎util.lisp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
:fill-paint fill-paint
2525
:stroke-paint stroke-paint))
2626

27-
(defun direction-vec (direction)
27+
(defun direction-to-vec (direction)
2828
(case direction
2929
(:up (gamekit:vec2 0 1))
3030
(:down (gamekit:vec2 0 -1))

0 commit comments

Comments
 (0)
This repository has been archived.