function to add units

This commit is contained in:
David Botton 2021-02-10 19:57:43 -05:00
parent 6867f705fa
commit 2c7ad56f20
3 changed files with 28 additions and 13 deletions

View file

@ -55,8 +55,8 @@
(return))
(when (connection-data-item body "done")
(return))
(setf (top mover) (format nil "~Apx" mover-y))
(setf (left mover) (format nil "~Apx" mover-x))
(setf (top mover) (unit :px mover-y))
(setf (left mover) (unit :px mover-x))
(if (= (random 2) 0)
(incf mover-y (random 10))
(decf mover-y (random 10)))