[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 0103a77462 302/472: Remove replace-filtered-game-o
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 0103a77462 302/472: Remove replace-filtered-game-objects (#153) |
Date: |
Thu, 6 Jan 2022 21:59:34 -0500 (EST) |
branch: elpa/pacmacs
commit 0103a774620eb9d5387d05c1b7f896c1dff4b021
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Remove replace-filtered-game-objects (#153)
pacmacs--unterrify-timed-out-ghosts can be rewritten in terms of
pacmacs--replace-game-objects
---
pacmacs.el | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/pacmacs.el b/pacmacs.el
index 0b3373fd32..e0887ab881 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -414,16 +414,6 @@
(pacmacs--create-game-object row column 'pacmacs--ghosts
#'pacmacs--make-ghost))
-(defun pacmacs--replace-filtered-game-objects (list-name replacing-constructor
predicate)
- (let ((game-objects (symbol-value list-name)))
- (dolist (game-object (-filter predicate game-objects))
- (plist-bind ((row :row)
- (column :column))
- game-object
- (funcall replacing-constructor row column))
- (pacmacs--remove-object game-object))
- (set list-name (-remove predicate game-objects))))
-
(defun pacmacs--replace-game-objects (game-objects new-constructor
old-destructor)
(dolist (game-object game-objects)
(plist-bind ((row :row)
@@ -439,11 +429,15 @@
(setq pacmacs--ghosts nil))
(defun pacmacs--unterrify-timed-out-ghosts ()
- (pacmacs--replace-filtered-game-objects
- 'pacmacs--terrified-ghosts
- #'pacmacs--create-ghost
- (-lambda (terrified-ghost)
- (<= (plist-get terrified-ghost :terrified-timer) 0))))
+ (let ((timed-out-predicate
+ (-lambda (terrified-ghost)
+ (<= (plist-get terrified-ghost :terrified-timer) 0))))
+ (pacmacs--replace-game-objects
+ (-filter timed-out-predicate pacmacs--terrified-ghosts)
+ #'pacmacs--create-ghost
+ #'pacmacs--remove-object)
+ (setq pacmacs--terrified-ghosts (-remove timed-out-predicate
+ pacmacs--terrified-ghosts))))
(defun pacmacs--detect-pill-collision ()
(plist-bind ((row :row)
- [nongnu] elpa/pacmacs 98599015bb 229/472: Fix UTs broken by #133 implementation, (continued)
- [nongnu] elpa/pacmacs 98599015bb 229/472: Fix UTs broken by #133 implementation, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e294101a92 231/472: Fix Game Over sign for connected walls (#131), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a7a4146732 234/472: Fix the wall corner gaps (#131), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 528ca62e28 251/472: Merge branch 'drop-xbm-support-141'. Close #141, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7d58295e93 281/472: Fix pacmacs--render-score-table function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c501625be6 282/472: Add Blinking Terrified Ghost animation. Close #155, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs da727a84c1 287/472: Double dash play state logic function (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d49e28e468 293/472: Remove pacmacs--opposite-direction-name (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e12ed88fe7 298/472: Generalize run-away-direction function (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs be52b6410f 294/472: UT for pacmacs--squared-distance (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0103a77462 302/472: Remove replace-filtered-game-objects (#153),
ELPA Syncer <=
- [nongnu] elpa/pacmacs ee76ee2dc0 299/472: UT for pacmacs--run-away-direction (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs cec13dd618 308/472: Fix Emacs 24.3 build fail (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e662ec9be7 313/472: Disable Emacs 24.3 in the Travis build (#165), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fa83e10d82 325/472: Get rid of dup code in track object mech (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 51117fc5db 336/472: Rename 5th big pill level accordingly (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0a33c04fc1 333/472: Add fourth big pill level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 402d176003 339/472: Remove unused functions (#171), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 71b977fd22 343/472: Transform it-recorder.el to an additional module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ad5cdc8efd 349/472: Add att.txt to gitignore, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8d63cc3f30 358/472: Multicolor walls (#138), ELPA Syncer, 2022/01/06