[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 4ab8f5d799 300/472: Unbind replace-game-objects fr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 4ab8f5d799 300/472: Unbind replace-game-objects from glob lists (#153) |
Date: |
Thu, 6 Jan 2022 21:59:33 -0500 (EST) |
branch: elpa/pacmacs
commit 4ab8f5d799deaf1d768b5bfbcadf72df91d56d52
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Unbind replace-game-objects from glob lists (#153)
It makes it easier to unit test
---
pacmacs.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/pacmacs.el b/pacmacs.el
index 8c4369139e..0b3373fd32 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -424,18 +424,19 @@
(pacmacs--remove-object game-object))
(set list-name (-remove predicate game-objects))))
-(defun pacmacs--replace-game-objects (list-name replacing-constructor)
- (dolist (game-object (symbol-value list-name))
+(defun pacmacs--replace-game-objects (game-objects new-constructor
old-destructor)
+ (dolist (game-object game-objects)
(plist-bind ((row :row)
(column :column))
game-object
- (funcall replacing-constructor row column))
- (pacmacs--remove-object game-object))
- (set list-name nil))
+ (funcall new-constructor row column))
+ (funcall old-destructor game-object)))
(defun pacmacs--terrify-all-ghosts ()
- (pacmacs--replace-game-objects 'pacmacs--ghosts
- #'pacmacs--create-terrified-ghost))
+ (pacmacs--replace-game-objects pacmacs--ghosts
+ #'pacmacs--create-terrified-ghost
+ #'pacmacs--remove-object)
+ (setq pacmacs--ghosts nil))
(defun pacmacs--unterrify-timed-out-ghosts ()
(pacmacs--replace-filtered-game-objects
- [nongnu] elpa/pacmacs 19ffa64f7e 230/472: Merge branch 'master' into connecte-walls, (continued)
- [nongnu] elpa/pacmacs 19ffa64f7e 230/472: Merge branch 'master' into connecte-walls, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e0856fc881 244/472: Refactor wall tiles functions (#131):, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 79aa80e1d2 245/472: Merge branch 'connecte-walls'. Close #131, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2b9811e71b 246/472: Add README for tools, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8e00815b4f 253/472: Disable undo for Pacmacs buffer. Close #143, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8a79a510ea 257/472: Blinking big pill (#81), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 93d8b91792 266/472: Merge branch 'automate-sprite-generting-26'., ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e618da968d 279/472: Add UT for pacmacs--sort-score-table, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9ec0ff9f4d 280/472: Add UT for pacmacs--render-score-table, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 612d7ff1dd 297/472: UT for pacmacs--decrease-terrified-timers (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4ab8f5d799 300/472: Unbind replace-game-objects from glob lists (#153),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 4396ec7412 315/472: Fix FIXME in handle-ghost-blinking-threshold, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5f3fbbab5a 319/472: Introduce distance based tracking (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 784b5c60e4 350/472: Merge pull request #177 from codingteam/qfix/broken-att-script, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b7a57c2d8e 353/472: Remove w/o BP tutorial level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4ce9773129 365/472: Merge pull request #183 from codingteam/push-instead-of-add-to-list-182, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 25e1fc9f85 369/472: Interactive function to clean wall cache (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b8ad3a5421 370/472: Fix game over sign (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 78be23ea40 392/472: Remove make-terrifed-ghost function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1d52833fef 406/472: Add render-score-record function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs bd030753f0 411/472: Reset pacmacs-score to 0 (#134), ELPA Syncer, 2022/01/06