[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs ece3e76f30 296/472: Rename run-away-direction argu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs ece3e76f30 296/472: Rename run-away-direction arguments (#153) |
Date: |
Thu, 6 Jan 2022 21:59:33 -0500 (EST) |
branch: elpa/pacmacs
commit ece3e76f30f49f30cd0568d0f756491d83c92069
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Rename run-away-direction arguments (#153)
Review note:
> @ForNeVeR: I don't like these names. They aren't making it obvious
> which object will run from what. I'd suggest use some more appropriate
> terms such as `runner` and `bogey` here.
---
pacmacs.el | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/pacmacs.el b/pacmacs.el
index 2a352bf356..faa3111f9e 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -372,25 +372,25 @@
(pacmacs--track-object ghost)
(pacmacs--step-object ghost)))
-(defun pacmacs--run-away-direction (game-object-1 game-object-2)
- (plist-bind ((row-1 :row)
- (column-1 :column))
- game-object-1
- (plist-bind ((row-2 :row)
- (column-2 :column))
- game-object-2
- (let* ((current-distance (pacmacs--squared-distance row-1 column-1
- row-2 column-2))
+(defun pacmacs--run-away-direction (runner bogey)
+ (plist-bind ((runner-row :row)
+ (runner-column :column))
+ runner
+ (plist-bind ((bogey-row :row)
+ (bogey-column :column))
+ bogey
+ (let* ((current-distance (pacmacs--squared-distance runner-row
runner-column
+ bogey-row
bogey-column))
(possible-ways
- (->> (pacmacs--possible-side-ways row-1 column-1)
+ (->> (pacmacs--possible-side-ways runner-row runner-column)
(-remove (-lambda ((row . column))
(or (pacmacs--wall-at-p row column)
(> current-distance
(pacmacs--squared-distance row column
- row-2
column-2))))))))
+ bogey-row
bogey-column))))))))
(-when-let ((row . column) (car possible-ways))
- (pacmacs--direction-name (cons (- row row-1)
- (- column column-1))))))))
+ (pacmacs--direction-name (cons (- row runner-row)
+ (- column runner-column))))))))
(defun pacmacs--step-terrified-ghosts ()
(dolist (terrified-ghost pacmacs--terrified-ghosts)
- [nongnu] elpa/pacmacs 62bcd78913 243/472: Refactor possible ways functions (#131):, (continued)
- [nongnu] elpa/pacmacs 62bcd78913 243/472: Refactor possible ways functions (#131):, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c2303269c0 249/472: Drop XBM support for empty cells (#141), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0f403095f0 265/472: Update README after repo transferring (#140), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 169cd54064 269/472: Add UT for pacmacs--bit-list-to-integer, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 769414fae0 274/472: Extend pacmacs--normalize-wall-bits UT, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d8a7998192 277/472: Extract `cask install` to separate step in README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 614a98ccc7 278/472: Cleanup README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fa6eca1731 284/472: Introduce list for terrified ghost objects (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 701da0f16c 285/472: Rename direction switching callbacks (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs cfa4437107 292/472: Implement eating terrified ghosts (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ece3e76f30 296/472: Rename run-away-direction arguments (#153),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 24ddb1b9ad 303/472: Merge pull request #160 from codingteam/terrified-ghost-state-153, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5cb14f20fd 301/472: UT for pacmacs--replace-game-objects (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 00b3223066 305/472: Handle ghost bling threshold (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d608708f15 311/472: UT for handle-ghost-blinking-threshold (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2297996e29 323/472: Smarter running away algorithm (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9b714e4678 321/472: Fix pacmacs--track-object UT (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 16a6ac7e98 327/472: UT for pacmacs--render-track-board, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 729de2de92 329/472: Remove big from the first level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 556098da2e 337/472: Put big pills level before w/o BP ones (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 151da84fdc 338/472: Remove replace-game-object function (#171), ELPA Syncer, 2022/01/06