make feathers that can't drop still toggle
2 files changed, 12 insertions(+), 0 deletions(-)

M sand.el
M sand.tests.el
M sand.el +4 -0
@@ 611,6 611,10 @@ Return the vector by which to move the c
                      (setf (sand//at new-row new-column) 'already-moved-balloon)))))))
       ('feather
        (setf (sand//at row column) 'feather-drop))
+      ((and 'feather-drop
+            (guard (equal step [0 0])))
+       (setf (sand//at row column)
+             'feather))
       (_ (unless (equal step [0 0])
            (let* ((delta-row (elt step 0))
                   (delta-column (elt step 1))

          
M sand.tests.el +8 -0
@@ 286,6 286,14 @@ Like this:
    (should (equal (sand//at 5 4)
                   'feather))))
 
+(ert-deftest tick-cell/dropping-feather-on-ledge ()
+  (sand//with-new-board
+   (setf (sand//at 4 4) 'feather-drop)
+   (setf (sand//at 5 4) 'ledge)
+   (sand//tick-cell 4 4)
+   (should (equal (sand//at 4 4)
+                  'feather))))
+
 (ert-deftest move-sand/into-smoke ()
   (sand//with-new-board
    (setf (sand//at 4 5) 'antimatter)