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

Commit

Permalink
More idiomatic naming
Browse files Browse the repository at this point in the history
  • Loading branch information
svercl committed Jun 19, 2019
1 parent 14141e3 commit 5150fd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snake.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
(with-slots (segments direction) snake
(let* ((position (snake-position snake))
;; The position of the next head.
(new-head (gamekit:add position (direction-vec direction)))
(new-head (gamekit:add position (direction-to-vec direction)))
;; If we ate the food we do not chop off the end of the SEGMENTS.
(which-segments (if ate-food-p segments (butlast segments)))
(new-segments (push new-head which-segments)))
Expand Down
2 changes: 1 addition & 1 deletion util.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
:fill-paint fill-paint
:stroke-paint stroke-paint))

(defun direction-vec (direction)
(defun direction-to-vec (direction)
(case direction
(:up (gamekit:vec2 0 1))
(:down (gamekit:vec2 0 -1))
Expand Down

0 comments on commit 5150fd0

Please sign in to comment.