From 5150fd0f490171b257c0b277e04576db9c5eea7e Mon Sep 17 00:00:00 2001 From: Brad Svercl Date: Tue, 18 Jun 2019 23:55:18 -0500 Subject: [PATCH] More idiomatic naming --- snake.lisp | 2 +- util.lisp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snake.lisp b/snake.lisp index 3da6191..0becbc1 100644 --- a/snake.lisp +++ b/snake.lisp @@ -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))) diff --git a/util.lisp b/util.lisp index de65bea..70f7255 100644 --- a/util.lisp +++ b/util.lisp @@ -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))