1 ; Copyright 2022 Frank Duncan (frank@consxy.com) under AGPL3. See distributed LICENSE.txt.
2 (in-package #:clnl-nvm)
4 (defun clear-patches ()
8 :for y :from (max-pycor) :downto (min-pycor)
10 :for x :from (min-pxcor) :to (max-pxcor)
12 :xcor (coerce x 'double-float)
13 :ycor (coerce y 'double-float)
16 (defun clear-turtles ()
18 (setf *current-id* 0))
23 (defcommand clear-all ()
30 Clears ticks, turtles, patches, globals (unimplemented).
32 See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#clear-all"
37 (defcommand display ()
44 As of yet, this does nothing. A placeholder method for forced dipslay
45 updates from the engine.
47 See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#display"
50 (defcommand reset-ticks ()
51 "RESET-TICKS => RESULT
57 Resets the tick counter to zero, sets up all plots, then updates all plots.
59 See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#reset-ticks"
63 "RESET-TICKS => RESULT
69 Advances the tick counter by one and updates all plots.
71 If the tick counter has not been started yet with reset-ticks, an error results.
73 See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#tick"
75 (when (not *ticks*) (error "reset-ticks must be called"))
79 "TICKS => CURRENT-TICKS
83 CURRENT-TICKS: A positiv double, representing the current number of ticks
87 Reports the current value of the tick counter. The result is always a number and never negative.
89 If the tick counter has not been started yet with reset-ticks, an error results.
91 See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#ticks"
92 (when (not *ticks*) (error "reset-ticks must be called"))