[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs e85c81b077 090/472: Enable entire code base for co
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs e85c81b077 090/472: Enable entire code base for coverage (#70) |
Date: |
Thu, 6 Jan 2022 21:59:15 -0500 (EST) |
branch: elpa/pacmacs
commit e85c81b077997d97f94e5cbb43e7f3496aa7739c
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Enable entire code base for coverage (#70)
---
pacmacs.el | 31 ++++++++++++++++---------------
test/test-helper.el | 4 +---
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/pacmacs.el b/pacmacs.el
index c75260922f..9c7afb5919 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -66,17 +66,6 @@
(cons (cons 0 1) 'down)))
(defvar pacmacs-player-state nil)
-(setq pacmacs-player-state
- (list :row 0
- :column 0
- :direction 'right
- :current-animation (pacmacs-load-anim "Pacman-Chomping-Right")
- :direction-animations (list 'left (pacmacs-load-anim
"Pacman-Chomping-Left")
- 'right (pacmacs-load-anim
"Pacman-Chomping-Right")
- 'up (pacmacs-load-anim
"Pacman-Chomping-Up")
- 'down (pacmacs-load-anim
"Pacman-Chomping-Down"))
- :speed 0
- :speed-counter 0))
(defvar pacmacs-ghosts nil)
(defvar pacmacs-wall-cells nil)
@@ -88,8 +77,6 @@
(pacmacs-make-anim (list (pacmacs-make-frame '(0 0 40 40) 100))
(pacmacs-create-transparent-block 40 40))))
-
-
(defvar pacmacs-board nil)
(defvar pacmacs-track-board nil)
@@ -138,6 +125,18 @@
:speed 1
:speed-counter 0))
+(defun pacmacs--make-player (row column)
+ (list :row row
+ :column column
+ :direction 'right
+ :current-animation (pacmacs-load-anim "Pacman-Chomping-Right")
+ :direction-animations (list 'left (pacmacs-load-anim
"Pacman-Chomping-Left")
+ 'right (pacmacs-load-anim
"Pacman-Chomping-Right")
+ 'up (pacmacs-load-anim
"Pacman-Chomping-Up")
+ 'down (pacmacs-load-anim
"Pacman-Chomping-Down"))
+ :speed 0
+ :speed-counter 0))
+
(defun pacmacs-init-board (width height)
(let ((board (make-vector height nil)))
(dotimes (row height)
@@ -406,8 +405,10 @@
(add-to-list 'pacmacs-pills (pacmacs--make-pill row
column)))
((char-equal x ?o)
- (plist-put pacmacs-player-state :row row)
- (plist-put pacmacs-player-state :column column))
+ (if (not pacmacs-player-state)
+ (setq pacmacs-player-state (pacmacs--make-player
row column))
+ (plist-put pacmacs-player-state :row row)
+ (plist-put pacmacs-player-state :column column)))
((char-equal x ?g)
(add-to-list 'pacmacs-ghosts (pacmacs--make-ghost row
column))))))))
diff --git a/test/test-helper.el b/test/test-helper.el
index 54c94e0a58..0115ca979d 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -6,6 +6,4 @@
(undercover "*.el")
(add-to-list 'load-path ".")
-(load "pacmacs-anim.el")
-(load "pacmacs-image.el")
-(load "pacmacs-utils.el")
+(load "pacmacs.el")
- [nongnu] elpa/pacmacs d3c94de6da 320/472: Remove UT for pacmacs--track-point (#159), (continued)
- [nongnu] elpa/pacmacs d3c94de6da 320/472: Remove UT for pacmacs--track-point (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8b40dc51cf 330/472: Add 1st big pill level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 49292e34d3 342/472: UT for terrified-ghost-timed-out-p function (#171), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 40a3d00209 367/472: Implement glowing walls (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5c45e17c40 399/472: Add docs for destroy function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f79355209d 060/472: Refactor out functions for creating images (#51), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 080aae5f08 070/472: Use plist-bind for pacman-anim-next-frame function (#54), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1e1cebe39a 073/472: Introduce plist-map utility function (#54), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ba7ad0349d 082/472: Rename pacman to pacmacs. Close #66, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c447091a19 085/472: Fix description in the game headers, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e85c81b077 090/472: Enable entire code base for coverage (#70),
ELPA Syncer <=
- [nongnu] elpa/pacmacs e3d914a1ea 097/472: Dropping support for Emacs 24.1 and 24.2. Close #71, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4b08605994 093/472: UTs for duration frame logic. Close #60, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c865fda214 120/472: Merge branch 'board-refactoring-74'. Close #74, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7e8970628c 122/472: Add sprites for Pacman Death animation. Close #44, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 99a90b9c87 125/472: Fix the tunneling effect. Close #88, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d49cb4afe3 128/472: Fix misspelling of the word `life` in single form, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 22dd5e5cf9 133/472: Rename pacmacs--detect-ghost-collision function (#97), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d2cf3bd4ba 144/472: Fix hitting ghost visibility bug. Close #78, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5db26b2e3d 154/472: Make the Game Over sign even more smaller, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5b32c6f310 155/472: Package resources with Cask (#95), ELPA Syncer, 2022/01/06