emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pacmacs ba7ad0349d 082/472: Rename pacman to pacmacs. Clos


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs ba7ad0349d 082/472: Rename pacman to pacmacs. Close #66
Date: Thu, 6 Jan 2022 21:59:14 -0500 (EST)

branch: elpa/pacmacs
commit ba7ad0349d67864424a239b2f67354fcb1b321cd
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>

    Rename pacman to pacmacs. Close #66
---
 Cask                                |   2 +-
 README.md                           |  14 +-
 pacman-anim.el => pacmacs-anim.el   |  48 ++--
 pacman-image.el => pacmacs-image.el |  16 +-
 pacman-utils.el => pacmacs-utils.el |   8 +-
 pacmacs.el                          | 426 ++++++++++++++++++++++++++++++++++++
 pacman.el                           | 426 ------------------------------------
 test/pacman-anim-test.el            |  46 ++--
 test/pacman-image-test.el           |  16 +-
 test/test-helper.el                 |   6 +-
 10 files changed, 505 insertions(+), 503 deletions(-)

diff --git a/Cask b/Cask
index b04c790419..b5703bcb5e 100644
--- a/Cask
+++ b/Cask
@@ -1,7 +1,7 @@
 (source gnu)
 (source melpa)
 
-(package-file "pacman.el")
+(package-file "pacmacs.el")
 
 (files "*.el")
 
diff --git a/README.md b/README.md
index d0d377744c..d8cc1171b6 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,17 @@
-[![Build 
Status](https://travis-ci.org/rexim/pacman.el.svg?branch=master)](https://travis-ci.org/rexim/pacman.el)
-[![Coverage 
Status](https://coveralls.io/repos/rexim/pacman.el/badge.svg?branch=master&service=github)](https://coveralls.io/github/rexim/pacman.el?branch=master)
+[![Build 
Status](https://travis-ci.org/rexim/pacmacs.el.svg?branch=master)](https://travis-ci.org/rexim/pacmacs.el)
+[![Coverage 
Status](https://coveralls.io/repos/rexim/pacmacs.el/badge.svg?branch=master&service=github)](https://coveralls.io/github/rexim/pacmacs.el?branch=master)
 
-# Pacman for Emacs #
+# Pacmacs #
+
+Pacman for Emacs
 
 ## Usage ##
 
-1. `$ git clone git://github.com/rexim/pacman.el.git && cd pacman.el`;
-2. `M-x find-file RET /path/to/pacman.el/pacman.el RET`
+1. `$ git clone git://github.com/rexim/pacmacs.el.git && cd pacmacs.el`;
+2. `M-x find-file RET /path/to/pacmacs.el/pacmacs.el RET`
 3. `M-x eval-expression RET (add-to-list 'load-path default-directory) RET`;
 4. `M-x eval-buffer RET`;
-5. `M-x pacman-start RET`.
+5. `M-x pacmacs-start RET`.
 
 ## Unit Tests ##
 
diff --git a/pacman-anim.el b/pacmacs-anim.el
similarity index 72%
rename from pacman-anim.el
rename to pacmacs-anim.el
index e3a396d229..830d9433cc 100644
--- a/pacman-anim.el
+++ b/pacmacs-anim.el
@@ -1,10 +1,10 @@
-;;; pacman-anim.el --- Pacman for Emacs
+;;; pacmacs-anim.el --- Pacmacs for Emacs
 
 ;; Copyright (C) 2015 Codingteam
 
 ;; Author: Codingteam <codingteam@conference.jabber.ru>
 ;; Maintainer: Alexey Kutepov <reximkut@gmail.com>
-;; URL: http://github.com/rexim/pacman.el
+;; URL: http://github.com/rexim/pacmacs.el
 
 ;; Permission is hereby granted, free of charge, to any person
 ;; obtaining a copy of this software and associated documentation
@@ -34,61 +34,61 @@
 
 (require 'json)
 
-(require 'pacman-image)
-(require 'pacman-utils)
+(require 'pacmacs-image)
+(require 'pacmacs-utils)
 
-(defun pacman-make-anim (frames sprite-sheet)
+(defun pacmacs-make-anim (frames sprite-sheet)
   (list :frames frames
         :current-frame 0
         :duration-counter 0
         :sprite-sheet sprite-sheet))
 
-(defun pacman-make-frame (frame duration)
+(defun pacmacs-make-frame (frame duration)
   (list :frame frame
         :duration duration))
 
-(defun pacman-load-anim (animation-name)
+(defun pacmacs-load-anim (animation-name)
   (let* ((aseprite-json-file (format "sprites/%s.json" animation-name))
          (sprite-sheet-file (format "sprites/%s.xpm" animation-name))
          (aseprite-json (json-read-file aseprite-json-file))
          (aseprite-frames (cdr (assoc 'frames aseprite-json)))
-         (sprite-sheet (pacman-load-image sprite-sheet-file)))
-    (pacman-make-anim
-     (mapcar 'pacman-convert-aseprite-frame
+         (sprite-sheet (pacmacs-load-image sprite-sheet-file)))
+    (pacmacs-make-anim
+     (mapcar 'pacmacs-convert-aseprite-frame
              (sort aseprite-frames
-                   'pacman-compare-aseprite-frames))
+                   'pacmacs-compare-aseprite-frames))
      sprite-sheet)))
 
-(defun pacman-aseprite-frame-get-order (aseprite-frame)
+(defun pacmacs-aseprite-frame-get-order (aseprite-frame)
   (let ((frame-name (symbol-name (car aseprite-frame))))
     (string-match "\\([0-9]+\\)\\.ase$" frame-name)
     (string-to-number (match-string 1 frame-name))))
 
-(defun pacman-compare-aseprite-frames (aseprite-frame1 aseprite-frame2)
-  (let ((order1 (pacman-aseprite-frame-get-order aseprite-frame1))
-        (order2 (pacman-aseprite-frame-get-order aseprite-frame2)))
+(defun pacmacs-compare-aseprite-frames (aseprite-frame1 aseprite-frame2)
+  (let ((order1 (pacmacs-aseprite-frame-get-order aseprite-frame1))
+        (order2 (pacmacs-aseprite-frame-get-order aseprite-frame2)))
     (< order1 order2)))
 
-(defun pacman-convert-aseprite-frame (aseprite-frame)
+(defun pacmacs-convert-aseprite-frame (aseprite-frame)
   (let* ((frame (cdr (assoc 'frame (cdr aseprite-frame))))
          (duration (cdr (assoc 'duration (cdr aseprite-frame)))))
-    (pacman-make-frame (mapcar (lambda (n)
+    (pacmacs-make-frame (mapcar (lambda (n)
                                  (cdr (assoc n frame)))
                                '(x y w h))
                        duration)))
 
-(defun pacman-anim-get-frame (anim)
+(defun pacmacs-anim-get-frame (anim)
   (plist-bind ((frames :frames)
                (current-frame :current-frame))
       anim
     (nth current-frame frames)))
 
-(defun pacman-anim-next-frame (anim time)
+(defun pacmacs-anim-next-frame (anim time)
   (plist-bind ((frames :frames)
                (current-frame :current-frame)
                (duration-counter :duration-counter))
       anim
-    (let ((duration (plist-get (pacman-anim-get-frame anim) :duration)))
+    (let ((duration (plist-get (pacmacs-anim-get-frame anim) :duration)))
       (if (<= duration (+ duration-counter time))
           (let ((new-current-frame (mod (+ current-frame 1)
                                         (length frames))))
@@ -96,11 +96,11 @@
             (plist-put anim :current-frame new-current-frame))
         (plist-put anim :duration-counter (+ duration-counter time))))))
 
-(defun pacman-anim-object-next-frame (anim-object time)
+(defun pacmacs-anim-object-next-frame (anim-object time)
   (plist-map anim-object :current-animation
              #'(lambda (anim)
-                 (pacman-anim-next-frame anim time))))
+                 (pacmacs-anim-next-frame anim time))))
 
-(provide 'pacman-anim)
+(provide 'pacmacs-anim)
 
-;;; pacman-anim.el ends here
+;;; pacmacs-anim.el ends here
diff --git a/pacman-image.el b/pacmacs-image.el
similarity index 83%
rename from pacman-image.el
rename to pacmacs-image.el
index 07cf37a81d..8e6a4f6237 100644
--- a/pacman-image.el
+++ b/pacmacs-image.el
@@ -1,10 +1,10 @@
-;;; pacman-image.el --- Pacman for Emacs
+;;; pacmacs-image.el --- Pacmacs for Emacs
 
 ;; Copyright (C) 2015 Codingteam
 
 ;; Author: Codingteam <codingteam@conference.jabber.ru>
 ;; Maintainer: Alexey Kutepov <reximkut@gmail.com>
-;; URL: http://github.com/rexim/pacman.el
+;; URL: http://github.com/rexim/pacmacs.el
 
 ;; Permission is hereby granted, free of charge, to any person
 ;; obtaining a copy of this software and associated documentation
@@ -32,14 +32,14 @@
 
 ;;; Code:
 
-(defun pacman-load-image (filename)
+(defun pacmacs-load-image (filename)
   (create-image (concat default-directory filename)
                 'xpm nil :heuristic-mask t))
 
-(defun pacman-insert-image (resource resource-vector)
+(defun pacmacs-insert-image (resource resource-vector)
   (insert-image resource " " nil resource-vector))
 
-(defun pacman-create-color-block (width height color)
+(defun pacmacs-create-color-block (width height color)
   (create-image
    (make-vector
     width (make-bool-vector height t))
@@ -47,12 +47,12 @@
    :foreground color
    :background color))
 
-(defun pacman-create-transparent-block (width height)
+(defun pacmacs-create-transparent-block (width height)
   (create-image
    (make-vector
     width (make-bool-vector height nil))
    'xbm t :width width :height height))
 
-(provide 'pacman-image)
+(provide 'pacmacs-image)
 
-;;; pacman-anim.el ends here
+;;; pacmacs-anim.el ends here
diff --git a/pacman-utils.el b/pacmacs-utils.el
similarity index 93%
rename from pacman-utils.el
rename to pacmacs-utils.el
index 3ff2903462..2a86ac3456 100644
--- a/pacman-utils.el
+++ b/pacmacs-utils.el
@@ -1,10 +1,10 @@
-;;; pacman-utils.el --- Pacman for Emacs
+;;; pacmacs-utils.el --- Pacmacs for Emacs
 
 ;; Copyright (C) 2015 Codingteam
 
 ;; Author: Codingteam <codingteam@conference.jabber.ru>
 ;; Maintainer: Alexey Kutepov <reximkut@gmail.com>
-;; URL: http://github.com/rexim/pacman.el
+;; URL: http://github.com/rexim/pacmacs.el
 
 ;; Permission is hereby granted, free of charge, to any person
 ;; obtaining a copy of this software and associated documentation
@@ -50,6 +50,6 @@ side-effects."
     (plist-put plist property
                (funcall transformer value))))
 
-(provide 'pacman-utils)
+(provide 'pacmacs-utils)
 
-;;; pacman.el ends here
+;;; pacmacs.el ends here
diff --git a/pacmacs.el b/pacmacs.el
new file mode 100644
index 0000000000..3e54d030ed
--- /dev/null
+++ b/pacmacs.el
@@ -0,0 +1,426 @@
+;;; pacmacs.el --- Pacmacs for Emacs
+
+;; Copyright (C) 2015 Codingteam
+
+;; Author: Codingteam <codingteam@conference.jabber.ru>
+;; Maintainer: Alexey Kutepov <reximkut@gmail.com>
+;; URL: http://github.com/rexim/pacmacs.el
+;; Version: 0.0.1
+
+;; Permission is hereby granted, free of charge, to any person
+;; obtaining a copy of this software and associated documentation
+;; files (the "Software"), to deal in the Software without
+;; restriction, including without limitation the rights to use, copy,
+;; modify, merge, publish, distribute, sublicense, and/or sell copies
+;; of the Software, and to permit persons to whom the Software is
+;; furnished to do so, subject to the following conditions:
+
+;; The above copyright notice and this permission notice shall be
+;; included in all copies or substantial portions of the Software.
+
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+;; BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+;; SOFTWARE.
+
+;;; Commentary:
+
+;; Pacmacs game for Emacs
+;;
+;; PLiOAioBxutV6QXPjBczSu7Xb_5kj-3KYA
+
+;;; Code:
+
+(require 'pacmacs-anim)
+(require 'pacmacs-image)
+(require 'pacmacs-utils)
+
+(defconst pacmacs-buffer-name "*Pacmacs*")
+(defconst pacmacs-tick-duration-ms 100)
+
+(defvar pacmacs-timer nil)
+(defvar pacmacs-counter 0)
+
+(defvar pacmacs-board-width 10)
+(defvar pacmacs-board-height 10)
+
+(defvar pacmacs-direction-table nil)
+(setq pacmacs-direction-table
+      (list 'left  (cons -1 0)
+            'right (cons 1 0)
+            'up    (cons 0 -1)
+            'down  (cons 0 1)))
+
+(defvar pacmacs-inversed-direction-table nil)
+(setq pacmacs-inversed-direction-table
+      (list (cons (cons -1 0) 'left)
+            (cons (cons 1 0) 'right)
+            (cons (cons 0 -1) 'up)
+            (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-ghost-state nil)
+(setq pacmacs-ghost-state
+      (list :row 1
+            :column 1
+            :direction 'right
+            :current-animation (pacmacs-load-anim "Red-Ghost-Right")
+            :direction-animations (list 'left  (pacmacs-load-anim 
"Red-Ghost-Left")
+                                        'right (pacmacs-load-anim 
"Red-Ghost-Right")
+                                        'up    (pacmacs-load-anim 
"Red-Ghost-Up")
+                                        'down  (pacmacs-load-anim 
"Red-Ghost-Down"))
+            :speed 1
+            :speed-counter 0))
+
+(defvar pacmacs-empty-cell nil)
+(setq pacmacs-empty-cell
+      (list :current-animation
+            (pacmacs-make-anim '((0 0 40 40))
+                              (pacmacs-create-transparent-block 40 40))))
+
+(defvar pacmacs-score 0)
+
+(defun pacmacs--make-wall-cell (row column)
+  (list :current-animation (pacmacs-make-anim '((0 0 40 40))
+                                     (pacmacs-create-color-block 40 40 "red"))
+        :row row
+        :column column))
+
+(defvar pacmacs-wall-cells nil)
+(setq pacmacs-wall-cells
+      (mapcar (lambda (n)
+                (pacmacs--make-wall-cell n n))
+              (number-sequence 1 9)))
+
+(defun pacmacs--make-pill (row column)
+  (list :current-animation (pacmacs-load-anim "Pill")
+        :row row
+        :column column))
+
+(defvar pacmacs-pills nil)
+(setq pacmacs-pills
+      (mapcar (lambda (n)
+                (pacmacs--make-pill n (1+ n)))
+              (number-sequence 1 8)))
+
+(defun pacmacs-init-board (width height)
+  (let ((board (make-vector height nil)))
+    (dotimes (row height)
+      (aset board row (make-vector width nil)))
+    board))
+
+(defvar pacmacs-board nil)
+(setq pacmacs-board (pacmacs-init-board pacmacs-board-width
+                                      pacmacs-board-height))
+
+
+(defvar pacmacs-track-board nil)
+(setq pacmacs-track-board (pacmacs-init-board pacmacs-board-width
+                                            pacmacs-board-height))
+
+(define-derived-mode pacmacs-mode special-mode "pacmacs-mode"
+  (define-key pacmacs-mode-map (kbd "<up>") 'pacmacs-up)
+  (define-key pacmacs-mode-map (kbd "<down>") 'pacmacs-down)
+  (define-key pacmacs-mode-map (kbd "<left>") 'pacmacs-left)
+  (define-key pacmacs-mode-map (kbd "<right>") 'pacmacs-right)
+  (define-key pacmacs-mode-map (kbd "q") 'pacmacs-quit)
+  (add-hook 'kill-buffer-hook 'pacmacs-destroy nil t)
+  (setq cursor-type nil))
+
+(defun pacmacs-start ()
+  (interactive)
+  (switch-to-buffer-other-window pacmacs-buffer-name)
+  (pacmacs-mode)
+  (unless pacmacs-timer
+    (setq pacmacs-timer (run-at-time nil (* pacmacs-tick-duration-ms 0.001) 
'pacmacs-tick))))
+
+(defun pacmacs-destroy ()
+  (when pacmacs-timer
+    (cancel-timer pacmacs-timer)
+    (setq pacmacs-timer nil)))
+
+(defun pacmacs--kill-buffer-and-its-window (buffer-or-name)
+  (let ((buffer-window (get-buffer-window buffer-or-name)))
+    (if (and buffer-window
+             (window-parent buffer-window))
+        (with-current-buffer buffer-or-name
+          (kill-buffer-and-window))
+      (kill-buffer buffer-or-name))))
+
+(defun pacmacs--object-at-p (row column objects)
+  (member (cons row column)
+          (mapcar (lambda (object)
+                    (plist-bind ((row :row)
+                                 (column :column))
+                        object
+                      (cons row column)))
+                  objects)))
+
+(defun pacmacs--wall-at-p (row column)
+  (pacmacs--object-at-p row column pacmacs-wall-cells))
+
+(defun pacmacs--pill-at-p (row column)
+  (pacmacs--object-at-p row column pacmacs-pills))
+
+(defun pacmacs-quit ()
+  (interactive)
+  (when (get-buffer pacmacs-buffer-name)
+    (pacmacs--kill-buffer-and-its-window pacmacs-buffer-name)))
+
+(defun pacmacs--cell-tracked-p (row column)
+  (aref (aref pacmacs-track-board row) column))
+
+(defun pacmacs--within-of-map-p (row column)
+  (and (<= 0 row (1- pacmacs-board-height))
+       (<= 0 column (1- pacmacs-board-width))))
+
+(defun pacmacs--switch-direction (game-object direction)
+  (plist-bind ((direction-animations :direction-animations))
+      game-object
+    (plist-put game-object :direction direction)
+    (plist-put game-object :current-animation (plist-get direction-animations 
direction))))
+
+(defun pacmacs-step-object (game-object)
+  (plist-bind ((row :row)
+               (column :column)
+               (direction :direction)
+               (speed-counter :speed-counter)
+               (speed :speed))
+      game-object
+    (if (zerop speed-counter)
+        (let* ((velocity (plist-get pacmacs-direction-table direction))
+               (new-row (+ row (cdr velocity)))
+               (new-column (+ column (car velocity))))
+          (plist-put game-object :speed-counter speed)
+          (when (and (pacmacs--within-of-map-p new-row new-column)
+                     (not (pacmacs--wall-at-p new-row new-column)))
+            (plist-put game-object :row new-row)
+            (plist-put game-object :column new-column)))
+      (plist-put game-object :speed-counter (1- speed-counter)))))
+
+(defun pacmacs--fill-board (board width height value)
+  (dotimes (row height)
+    (dotimes (column width)
+      (aset (aref board row) column value))))
+
+(defun pacmacs--possible-ways (row column)
+  (list (cons (1+ row)  column)
+        (cons row (1+ column))
+        (cons (1- row) column)
+        (cons row (1- column))))
+
+(defun pacmacs--filter-candidates (p)
+  (let ((row (car p))
+        (column (cdr p)))
+    (or (not (pacmacs--within-of-map-p row column))
+        (pacmacs--wall-at-p row column)
+        (pacmacs--cell-tracked-p row column))))
+
+(defun pacmacs--track-point (p q)
+  (let* ((p-row (car p))
+         (p-column (cdr p))
+
+         (q-row (car q))
+         (q-column (cdr q))
+
+         (d-row (- q-row p-row))
+         (d-column (- q-column p-column)))
+    (aset (aref pacmacs-track-board p-row) p-column
+          (cdr
+           (assoc (cons d-column d-row)
+                  pacmacs-inversed-direction-table)))))
+
+(defun pacmacs--recalc-track-board ()
+  (pacmacs--fill-board pacmacs-track-board
+                      pacmacs-board-width
+                      pacmacs-board-height
+                      nil)
+  (plist-bind ((player-row :row)
+               (player-column :column))
+      pacmacs-player-state
+    (let ((wave (list (cons player-row player-column))))
+      (while (not (null wave))
+        (let ((next-wave nil))
+          (dolist (p wave)
+            (let* ((row (car p))
+                   (column (cdr p))
+                   (possible-ways (pacmacs--possible-ways row column))
+                   (candidate-ways
+                    (remove-if #'pacmacs--filter-candidates possible-ways)))
+              (dolist (candidate-way candidate-ways)
+                (pacmacs--track-point candidate-way p))
+              (setq next-wave
+                    (append next-wave candidate-ways))))
+          (setq wave next-wave))))))
+
+(defun pacmacs--track-object (game-object)
+  (plist-bind ((row :row)
+               (column :column))
+      game-object
+    (let ((direction (aref (aref pacmacs-track-board row) column)))
+      (pacmacs--switch-direction game-object direction))))
+
+(defun pacmacs-tick ()
+  (interactive)
+  (with-current-buffer pacmacs-buffer-name
+    (let ((inhibit-read-only t))
+      (pacmacs-anim-object-next-frame pacmacs-player-state 
pacmacs-tick-duration-ms)
+      (pacmacs-anim-object-next-frame pacmacs-ghost-state 
pacmacs-tick-duration-ms)
+      (dolist (pill pacmacs-pills)
+        (pacmacs-anim-object-next-frame pill pacmacs-tick-duration-ms))
+      
+      (pacmacs-step-object pacmacs-player-state)
+
+      (plist-bind ((row :row)
+                   (column :column))
+          pacmacs-player-state
+        (let ((pill (pacmacs--pill-at-p row column)))
+          (when pill
+            (setq pacmacs-score (+ pacmacs-score 10))
+            (setq pacmacs-pills
+                  (remove-if (lambda (pill)
+                               (plist-bind ((p-row :row)
+                                            (p-column :column))
+                                   pill
+                                 (and (= row p-row)
+                                      (= column p-column))))
+                             pacmacs-pills)))))
+
+      (pacmacs--recalc-track-board)
+      (pacmacs--track-object pacmacs-ghost-state)
+      (pacmacs-step-object pacmacs-ghost-state)
+      
+      (erase-buffer)
+      (pacmacs-render-state))))
+
+(defun pacmacs-render-object (anim-object)
+  (let* ((anim (plist-get anim-object :current-animation))
+         (sprite-sheet (plist-get anim :sprite-sheet))
+         (current-frame (plist-get (pacmacs-anim-get-frame anim) :frame)))
+    (pacmacs-insert-image sprite-sheet current-frame)))
+
+(defun pacmacs-put-object (anim-object)
+  (plist-bind ((row :row)
+               (column :column))
+      anim-object
+    (when (and (<= 0 row (1- pacmacs-board-height))
+               (<= 0 column (1- pacmacs-board-width)))
+      (aset (aref pacmacs-board row) column anim-object))))
+
+(defun pacmacs-render-track-board ()
+  (dotimes (row pacmacs-board-height)
+    (dotimes (column pacmacs-board-width)
+      (let ((x (aref (aref pacmacs-track-board row) column)))
+        (cond
+         ((null x)
+          (insert "."))
+         ((equal x 'left)
+          (insert "<"))
+         ((equal x 'right)
+          (insert ">"))
+         ((equal x 'up)
+          (insert "^"))
+         ((equal x 'down)
+          (insert "v")))))
+    (insert "\n")))
+
+(defun pacmacs-render-state ()
+  (insert (format "Score: %d\n" pacmacs-score))
+
+  (pacmacs-render-track-board)
+
+  (pacmacs--fill-board pacmacs-board
+                      pacmacs-board-width
+                      pacmacs-board-height
+                      pacmacs-empty-cell)
+
+  (pacmacs-put-object pacmacs-player-state)
+
+  (dolist (pill pacmacs-pills)
+    (pacmacs-put-object pill))
+
+  (pacmacs-put-object pacmacs-ghost-state)
+  
+  (dolist (wall pacmacs-wall-cells)
+    (pacmacs-put-object wall))
+
+  (dotimes (row pacmacs-board-height)
+    (dotimes (column pacmacs-board-width)
+      (let ((anim-object (aref (aref pacmacs-board row) column)))
+        (pacmacs-render-object anim-object)))
+    (insert "\n")))
+
+(defun pacmacs-up ()
+  (interactive)
+  (pacmacs--switch-direction pacmacs-player-state 'up))
+
+(defun pacmacs-down ()
+  (interactive)
+  (pacmacs--switch-direction pacmacs-player-state 'down))
+
+(defun pacmacs-left ()
+  (interactive)
+  (pacmacs--switch-direction pacmacs-player-state 'left))
+
+(defun pacmacs-right ()
+  (interactive)
+  (pacmacs--switch-direction pacmacs-player-state 'right))
+
+(defun pacmacs--file-content (filename)
+  (with-temp-buffer
+    (insert-file-contents filename)
+    (buffer-string)))
+
+(defun pacmacs-load-map (map-name)
+  (let* ((lines (split-string (pacmacs--file-content (format "maps/%s.txt" 
map-name)) "\n" t))
+         (board-width (apply 'max (mapcar #'length lines)))
+         (board-height (length lines)))
+    (setq pacmacs-board-width board-width)
+    (setq pacmacs-board-height board-height)
+
+    (setq pacmacs-board (pacmacs-init-board pacmacs-board-width
+                                          pacmacs-board-height))
+    (setq pacmacs-track-board (pacmacs-init-board pacmacs-board-width
+                                                pacmacs-board-height))
+
+    (setq pacmacs-wall-cells nil)
+    (setq pacmacs-pills nil)
+
+    (loop
+     for line being the element of lines using (index row)
+     do (loop for x being the element of line using (index column)
+              do (cond ((char-equal x ?#)
+                        (add-to-list 'pacmacs-wall-cells 
(pacmacs--make-wall-cell row column)))
+
+                       ((char-equal x ?.)
+                        (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))
+
+                       ((char-equal x ?g)
+                        (plist-put pacmacs-ghost-state :row row)
+                        (plist-put pacmacs-ghost-state :column column)))))))
+
+(pacmacs-load-map "map01")
+
+(provide 'pacmacs)
+
+;;; pacmacs.el ends here
diff --git a/pacman.el b/pacman.el
deleted file mode 100644
index bea1a7dad0..0000000000
--- a/pacman.el
+++ /dev/null
@@ -1,426 +0,0 @@
-;;; pacman.el --- Pacman for Emacs
-
-;; Copyright (C) 2015 Codingteam
-
-;; Author: Codingteam <codingteam@conference.jabber.ru>
-;; Maintainer: Alexey Kutepov <reximkut@gmail.com>
-;; URL: http://github.com/rexim/pacman.el
-;; Version: 0.0.1
-
-;; Permission is hereby granted, free of charge, to any person
-;; obtaining a copy of this software and associated documentation
-;; files (the "Software"), to deal in the Software without
-;; restriction, including without limitation the rights to use, copy,
-;; modify, merge, publish, distribute, sublicense, and/or sell copies
-;; of the Software, and to permit persons to whom the Software is
-;; furnished to do so, subject to the following conditions:
-
-;; The above copyright notice and this permission notice shall be
-;; included in all copies or substantial portions of the Software.
-
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-;; BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-
-;;; Commentary:
-
-;; Pacman game for Emacs
-;;
-;; PLiOAioBxutV6QXPjBczSu7Xb_5kj-3KYA
-
-;;; Code:
-
-(require 'pacman-anim)
-(require 'pacman-image)
-(require 'pacman-utils)
-
-(defconst pacman-buffer-name "*Pacman*")
-(defconst pacman-tick-duration-ms 100)
-
-(defvar pacman-timer nil)
-(defvar pacman-counter 0)
-
-(defvar pacman-board-width 10)
-(defvar pacman-board-height 10)
-
-(defvar pacman-direction-table nil)
-(setq pacman-direction-table
-      (list 'left  (cons -1 0)
-            'right (cons 1 0)
-            'up    (cons 0 -1)
-            'down  (cons 0 1)))
-
-(defvar pacman-inversed-direction-table nil)
-(setq pacman-inversed-direction-table
-      (list (cons (cons -1 0) 'left)
-            (cons (cons 1 0) 'right)
-            (cons (cons 0 -1) 'up)
-            (cons (cons 0 1) 'down)))
-
-(defvar pacman-player-state nil)
-(setq pacman-player-state
-      (list :row 0
-            :column 0
-            :direction 'right
-            :current-animation (pacman-load-anim "Pacman-Chomping-Right")
-            :direction-animations (list 'left  (pacman-load-anim 
"Pacman-Chomping-Left")
-                                        'right (pacman-load-anim 
"Pacman-Chomping-Right")
-                                        'up    (pacman-load-anim 
"Pacman-Chomping-Up")
-                                        'down  (pacman-load-anim 
"Pacman-Chomping-Down"))
-            :speed 0
-            :speed-counter 0))
-
-(defvar pacman-ghost-state nil)
-(setq pacman-ghost-state
-      (list :row 1
-            :column 1
-            :direction 'right
-            :current-animation (pacman-load-anim "Red-Ghost-Right")
-            :direction-animations (list 'left  (pacman-load-anim 
"Red-Ghost-Left")
-                                        'right (pacman-load-anim 
"Red-Ghost-Right")
-                                        'up    (pacman-load-anim 
"Red-Ghost-Up")
-                                        'down  (pacman-load-anim 
"Red-Ghost-Down"))
-            :speed 1
-            :speed-counter 0))
-
-(defvar pacman-empty-cell nil)
-(setq pacman-empty-cell
-      (list :current-animation
-            (pacman-make-anim '((0 0 40 40))
-                              (pacman-create-transparent-block 40 40))))
-
-(defvar pacman-score 0)
-
-(defun pacman--make-wall-cell (row column)
-  (list :current-animation (pacman-make-anim '((0 0 40 40))
-                                     (pacman-create-color-block 40 40 "red"))
-        :row row
-        :column column))
-
-(defvar pacman-wall-cells nil)
-(setq pacman-wall-cells
-      (mapcar (lambda (n)
-                (pacman--make-wall-cell n n))
-              (number-sequence 1 9)))
-
-(defun pacman--make-pill (row column)
-  (list :current-animation (pacman-load-anim "Pill")
-        :row row
-        :column column))
-
-(defvar pacman-pills nil)
-(setq pacman-pills
-      (mapcar (lambda (n)
-                (pacman--make-pill n (1+ n)))
-              (number-sequence 1 8)))
-
-(defun pacman-init-board (width height)
-  (let ((board (make-vector height nil)))
-    (dotimes (row height)
-      (aset board row (make-vector width nil)))
-    board))
-
-(defvar pacman-board nil)
-(setq pacman-board (pacman-init-board pacman-board-width
-                                      pacman-board-height))
-
-
-(defvar pacman-track-board nil)
-(setq pacman-track-board (pacman-init-board pacman-board-width
-                                            pacman-board-height))
-
-(define-derived-mode pacman-mode special-mode "pacman-mode"
-  (define-key pacman-mode-map (kbd "<up>") 'pacman-up)
-  (define-key pacman-mode-map (kbd "<down>") 'pacman-down)
-  (define-key pacman-mode-map (kbd "<left>") 'pacman-left)
-  (define-key pacman-mode-map (kbd "<right>") 'pacman-right)
-  (define-key pacman-mode-map (kbd "q") 'pacman-quit)
-  (add-hook 'kill-buffer-hook 'pacman-destroy nil t)
-  (setq cursor-type nil))
-
-(defun pacman-start ()
-  (interactive)
-  (switch-to-buffer-other-window pacman-buffer-name)
-  (pacman-mode)
-  (unless pacman-timer
-    (setq pacman-timer (run-at-time nil (* pacman-tick-duration-ms 0.001) 
'pacman-tick))))
-
-(defun pacman-destroy ()
-  (when pacman-timer
-    (cancel-timer pacman-timer)
-    (setq pacman-timer nil)))
-
-(defun pacman--kill-buffer-and-its-window (buffer-or-name)
-  (let ((buffer-window (get-buffer-window buffer-or-name)))
-    (if (and buffer-window
-             (window-parent buffer-window))
-        (with-current-buffer buffer-or-name
-          (kill-buffer-and-window))
-      (kill-buffer buffer-or-name))))
-
-(defun pacman--object-at-p (row column objects)
-  (member (cons row column)
-          (mapcar (lambda (object)
-                    (plist-bind ((row :row)
-                                 (column :column))
-                        object
-                      (cons row column)))
-                  objects)))
-
-(defun pacman--wall-at-p (row column)
-  (pacman--object-at-p row column pacman-wall-cells))
-
-(defun pacman--pill-at-p (row column)
-  (pacman--object-at-p row column pacman-pills))
-
-(defun pacman-quit ()
-  (interactive)
-  (when (get-buffer pacman-buffer-name)
-    (pacman--kill-buffer-and-its-window pacman-buffer-name)))
-
-(defun pacman--cell-tracked-p (row column)
-  (aref (aref pacman-track-board row) column))
-
-(defun pacman--within-of-map-p (row column)
-  (and (<= 0 row (1- pacman-board-height))
-       (<= 0 column (1- pacman-board-width))))
-
-(defun pacman--switch-direction (game-object direction)
-  (plist-bind ((direction-animations :direction-animations))
-      game-object
-    (plist-put game-object :direction direction)
-    (plist-put game-object :current-animation (plist-get direction-animations 
direction))))
-
-(defun pacman-step-object (game-object)
-  (plist-bind ((row :row)
-               (column :column)
-               (direction :direction)
-               (speed-counter :speed-counter)
-               (speed :speed))
-      game-object
-    (if (zerop speed-counter)
-        (let* ((velocity (plist-get pacman-direction-table direction))
-               (new-row (+ row (cdr velocity)))
-               (new-column (+ column (car velocity))))
-          (plist-put game-object :speed-counter speed)
-          (when (and (pacman--within-of-map-p new-row new-column)
-                     (not (pacman--wall-at-p new-row new-column)))
-            (plist-put game-object :row new-row)
-            (plist-put game-object :column new-column)))
-      (plist-put game-object :speed-counter (1- speed-counter)))))
-
-(defun pacman--fill-board (board width height value)
-  (dotimes (row height)
-    (dotimes (column width)
-      (aset (aref board row) column value))))
-
-(defun pacman--possible-ways (row column)
-  (list (cons (1+ row)  column)
-        (cons row (1+ column))
-        (cons (1- row) column)
-        (cons row (1- column))))
-
-(defun pacman--filter-candidates (p)
-  (let ((row (car p))
-        (column (cdr p)))
-    (or (not (pacman--within-of-map-p row column))
-        (pacman--wall-at-p row column)
-        (pacman--cell-tracked-p row column))))
-
-(defun pacman--track-point (p q)
-  (let* ((p-row (car p))
-         (p-column (cdr p))
-
-         (q-row (car q))
-         (q-column (cdr q))
-
-         (d-row (- q-row p-row))
-         (d-column (- q-column p-column)))
-    (aset (aref pacman-track-board p-row) p-column
-          (cdr
-           (assoc (cons d-column d-row)
-                  pacman-inversed-direction-table)))))
-
-(defun pacman--recalc-track-board ()
-  (pacman--fill-board pacman-track-board
-                      pacman-board-width
-                      pacman-board-height
-                      nil)
-  (plist-bind ((player-row :row)
-               (player-column :column))
-      pacman-player-state
-    (let ((wave (list (cons player-row player-column))))
-      (while (not (null wave))
-        (let ((next-wave nil))
-          (dolist (p wave)
-            (let* ((row (car p))
-                   (column (cdr p))
-                   (possible-ways (pacman--possible-ways row column))
-                   (candidate-ways
-                    (remove-if #'pacman--filter-candidates possible-ways)))
-              (dolist (candidate-way candidate-ways)
-                (pacman--track-point candidate-way p))
-              (setq next-wave
-                    (append next-wave candidate-ways))))
-          (setq wave next-wave))))))
-
-(defun pacman--track-object (game-object)
-  (plist-bind ((row :row)
-               (column :column))
-      game-object
-    (let ((direction (aref (aref pacman-track-board row) column)))
-      (pacman--switch-direction game-object direction))))
-
-(defun pacman-tick ()
-  (interactive)
-  (with-current-buffer pacman-buffer-name
-    (let ((inhibit-read-only t))
-      (pacman-anim-object-next-frame pacman-player-state 
pacman-tick-duration-ms)
-      (pacman-anim-object-next-frame pacman-ghost-state 
pacman-tick-duration-ms)
-      (dolist (pill pacman-pills)
-        (pacman-anim-object-next-frame pill pacman-tick-duration-ms))
-      
-      (pacman-step-object pacman-player-state)
-
-      (plist-bind ((row :row)
-                   (column :column))
-          pacman-player-state
-        (let ((pill (pacman--pill-at-p row column)))
-          (when pill
-            (setq pacman-score (+ pacman-score 10))
-            (setq pacman-pills
-                  (remove-if (lambda (pill)
-                               (plist-bind ((p-row :row)
-                                            (p-column :column))
-                                   pill
-                                 (and (= row p-row)
-                                      (= column p-column))))
-                             pacman-pills)))))
-
-      (pacman--recalc-track-board)
-      (pacman--track-object pacman-ghost-state)
-      (pacman-step-object pacman-ghost-state)
-      
-      (erase-buffer)
-      (pacman-render-state))))
-
-(defun pacman-render-object (anim-object)
-  (let* ((anim (plist-get anim-object :current-animation))
-         (sprite-sheet (plist-get anim :sprite-sheet))
-         (current-frame (plist-get (pacman-anim-get-frame anim) :frame)))
-    (pacman-insert-image sprite-sheet current-frame)))
-
-(defun pacman-put-object (anim-object)
-  (plist-bind ((row :row)
-               (column :column))
-      anim-object
-    (when (and (<= 0 row (1- pacman-board-height))
-               (<= 0 column (1- pacman-board-width)))
-      (aset (aref pacman-board row) column anim-object))))
-
-(defun pacman-render-track-board ()
-  (dotimes (row pacman-board-height)
-    (dotimes (column pacman-board-width)
-      (let ((x (aref (aref pacman-track-board row) column)))
-        (cond
-         ((null x)
-          (insert "."))
-         ((equal x 'left)
-          (insert "<"))
-         ((equal x 'right)
-          (insert ">"))
-         ((equal x 'up)
-          (insert "^"))
-         ((equal x 'down)
-          (insert "v")))))
-    (insert "\n")))
-
-(defun pacman-render-state ()
-  (insert (format "Score: %d\n" pacman-score))
-
-  (pacman-render-track-board)
-
-  (pacman--fill-board pacman-board
-                      pacman-board-width
-                      pacman-board-height
-                      pacman-empty-cell)
-
-  (pacman-put-object pacman-player-state)
-
-  (dolist (pill pacman-pills)
-    (pacman-put-object pill))
-
-  (pacman-put-object pacman-ghost-state)
-  
-  (dolist (wall pacman-wall-cells)
-    (pacman-put-object wall))
-
-  (dotimes (row pacman-board-height)
-    (dotimes (column pacman-board-width)
-      (let ((anim-object (aref (aref pacman-board row) column)))
-        (pacman-render-object anim-object)))
-    (insert "\n")))
-
-(defun pacman-up ()
-  (interactive)
-  (pacman--switch-direction pacman-player-state 'up))
-
-(defun pacman-down ()
-  (interactive)
-  (pacman--switch-direction pacman-player-state 'down))
-
-(defun pacman-left ()
-  (interactive)
-  (pacman--switch-direction pacman-player-state 'left))
-
-(defun pacman-right ()
-  (interactive)
-  (pacman--switch-direction pacman-player-state 'right))
-
-(defun pacman--file-content (filename)
-  (with-temp-buffer
-    (insert-file-contents filename)
-    (buffer-string)))
-
-(defun pacman-load-map (map-name)
-  (let* ((lines (split-string (pacman--file-content (format "maps/%s.txt" 
map-name)) "\n" t))
-         (board-width (apply 'max (mapcar #'length lines)))
-         (board-height (length lines)))
-    (setq pacman-board-width board-width)
-    (setq pacman-board-height board-height)
-
-    (setq pacman-board (pacman-init-board pacman-board-width
-                                          pacman-board-height))
-    (setq pacman-track-board (pacman-init-board pacman-board-width
-                                                pacman-board-height))
-
-    (setq pacman-wall-cells nil)
-    (setq pacman-pills nil)
-
-    (loop
-     for line being the element of lines using (index row)
-     do (loop for x being the element of line using (index column)
-              do (cond ((char-equal x ?#)
-                        (add-to-list 'pacman-wall-cells 
(pacman--make-wall-cell row column)))
-
-                       ((char-equal x ?.)
-                        (add-to-list 'pacman-pills (pacman--make-pill row 
column)))
-
-                       ((char-equal x ?o)
-                        (plist-put pacman-player-state :row row)
-                        (plist-put pacman-player-state :column column))
-
-                       ((char-equal x ?g)
-                        (plist-put pacman-ghost-state :row row)
-                        (plist-put pacman-ghost-state :column column)))))))
-
-(pacman-load-map "map01")
-
-(provide 'pacman)
-
-;;; pacman.el ends here
diff --git a/test/pacman-anim-test.el b/test/pacman-anim-test.el
index e5e1bc2623..c26629cdf6 100644
--- a/test/pacman-anim-test.el
+++ b/test/pacman-anim-test.el
@@ -1,36 +1,36 @@
-(ert-deftest pacman-make-anim-test ()
+(ert-deftest pacmacs-make-anim-test ()
   (should (equal (list :frames (list 1 2 3 4 5)
                        :current-frame 0
                        :duration-counter 0
                        :sprite-sheet 42)
-                 (pacman-make-anim (number-sequence 1 5) 42))))
+                 (pacmacs-make-anim (number-sequence 1 5) 42))))
 
-(ert-deftest pacman-anim-get-frame-test ()
+(ert-deftest pacmacs-anim-get-frame-test ()
   (let ((anim (list :frames (number-sequence 1 5)
                     :current-frame 2)))
-    (should (equal 3 (pacman-anim-get-frame anim)))))
+    (should (equal 3 (pacmacs-anim-get-frame anim)))))
 
-(ert-deftest pacman-anim-next-frame-test ()
+(ert-deftest pacmacs-anim-next-frame-test ()
   (let ((anim (list :frames (mapcar (lambda (x)
-                                      (pacman-make-frame (+ 41 x) 100))
+                                      (pacmacs-make-frame (+ 41 x) 100))
                                     (number-sequence 1 4)) 
                     :current-frame 2
                     :duration-counter 0)))
-    (pacman-anim-next-frame anim 100)
+    (pacmacs-anim-next-frame anim 100)
     (should (equal 3 (plist-get anim :current-frame)))
 
-    (pacman-anim-next-frame anim 100)
+    (pacmacs-anim-next-frame anim 100)
     (should (equal 0 (plist-get anim :current-frame)))))
 
-(ert-deftest pacman-anim-object-next-frame-test ()
+(ert-deftest pacmacs-anim-object-next-frame-test ()
   (with-mock
-   (stub pacman-anim-next-frame => 42)
+   (stub pacmacs-anim-next-frame => 42)
    (let ((anim-object '(:current-animation 41)))
-     (pacman-anim-object-next-frame anim-object 100)
+     (pacmacs-anim-object-next-frame anim-object 100)
      (should (equal '(:current-animation 42)
                     anim-object)))))
 
-(ert-deftest pacman-convert-aseprite-frame-test ()
+(ert-deftest pacmacs-convert-aseprite-frame-test ()
   (let ((aseprite-frame '(khooy
                           (foo . bar)
                           (frame
@@ -42,9 +42,9 @@
         (expected-frame (list :frame (list 1 2 4 3)
                               :duration 100)))
     (should (equal expected-frame
-                   (pacman-convert-aseprite-frame aseprite-frame)))))
+                   (pacmacs-convert-aseprite-frame aseprite-frame)))))
 
-(ert-deftest pacman-aseprite-frame-get-order-test ()
+(ert-deftest pacmacs-aseprite-frame-get-order-test ()
   (let ((aseprite-frame '(khooy42.ase
                           (foo . bar)
                           (frame
@@ -52,9 +52,9 @@
                            (y . 2)
                            (h . 3)
                            (w . 4)))))
-    (should (equal 42 (pacman-aseprite-frame-get-order aseprite-frame)))))
+    (should (equal 42 (pacmacs-aseprite-frame-get-order aseprite-frame)))))
 
-(ert-deftest pacman-compare-aseprite-frames-test ()
+(ert-deftest pacmacs-compare-aseprite-frames-test ()
   (let ((aseprite-frame1 '(khooy42.ase
                            (foo . bar)
                            (frame
@@ -69,10 +69,10 @@
                             (y . 2)
                             (h . 3)
                             (w . 4)))))
-    (should (pacman-compare-aseprite-frames aseprite-frame1 aseprite-frame2))
-    (should (not (pacman-compare-aseprite-frames aseprite-frame2 
aseprite-frame1)))))
+    (should (pacmacs-compare-aseprite-frames aseprite-frame1 aseprite-frame2))
+    (should (not (pacmacs-compare-aseprite-frames aseprite-frame2 
aseprite-frame1)))))
 
-(ert-deftest pacman-load-anim-test ()
+(ert-deftest pacmacs-load-anim-test ()
   (let* ((input-aseprite-format '((frames
                                    (frame-3\.ase (frame (h . 3) (w . 3) (y . 
3) (x . 3))
                                                  (duration . 400))
@@ -83,14 +83,14 @@
                                    (frame-0\.ase (frame (h . 0) (w . 0) (y . 
0) (x . 0))
                                                  (duration . 100)))))
          (input-sprite-sheet 42)
-         (expected-output (pacman-make-anim
+         (expected-output (pacmacs-make-anim
                            (mapcar #'(lambda (x)
-                                       (pacman-make-frame (make-list 4 x)
+                                       (pacmacs-make-frame (make-list 4 x)
                                                           (* (1+ x) 100)))
                                    (number-sequence 0 3))
                            input-sprite-sheet)))
     (with-mock
      (mock (json-read-file *) => input-aseprite-format)
-     (mock (pacman-load-image *) => input-sprite-sheet)
+     (mock (pacmacs-load-image *) => input-sprite-sheet)
      (should (equal expected-output
-                    (pacman-load-anim "foo"))))))
+                    (pacmacs-load-anim "foo"))))))
diff --git a/test/pacman-image-test.el b/test/pacman-image-test.el
index ee90db82bc..6c78c9c124 100644
--- a/test/pacman-image-test.el
+++ b/test/pacman-image-test.el
@@ -1,17 +1,17 @@
-(ert-deftest pacman-load-image-test ()
+(ert-deftest pacmacs-load-image-test ()
   (let ((default-directory "/khooy/"))
     (with-mock
      (mock (create-image "/khooy/pew" 'xpm nil :heuristic-mask t) => 42 :times 
1)
-     (should (= 42 (pacman-load-image "pew"))))))
+     (should (= 42 (pacmacs-load-image "pew"))))))
 
-(ert-deftest pacman-insert-image-test ()
+(ert-deftest pacmacs-insert-image-test ()
   (let ((resource "khooy")
         (resource-vector "pew"))
     (with-mock
      (mock (insert-image resource " " nil resource-vector) => 42 :times 1)
-     (should (= 42 (pacman-insert-image resource resource-vector))))))
+     (should (= 42 (pacmacs-insert-image resource resource-vector))))))
 
-(ert-deftest pacman-create-color-block-test ()
+(ert-deftest pacmacs-create-color-block-test ()
   (let ((width 10)
         (height 20)
         (color "red")
@@ -27,9 +27,9 @@
                          :foreground color
                          :background color) => create-image-result :times 1)
      (should (equal create-image-result
-                    (pacman-create-color-block width height color))))))
+                    (pacmacs-create-color-block width height color))))))
 
-(ert-deftest pacman-create-transparent-block ()
+(ert-deftest pacmacs-create-transparent-block ()
   (let ((width 10)
         (height 20)
         (bool-vector-result 42)
@@ -43,4 +43,4 @@
                          :width width
                          :height height) => create-image-result :times 1)
      (should (equal create-image-result
-                    (pacman-create-transparent-block width height))))))
+                    (pacmacs-create-transparent-block width height))))))
diff --git a/test/test-helper.el b/test/test-helper.el
index 55373381c1..54c94e0a58 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -6,6 +6,6 @@
 (undercover "*.el")
 
 (add-to-list 'load-path ".")
-(load "pacman-anim.el")
-(load "pacman-image.el")
-(load "pacman-utils.el")
+(load "pacmacs-anim.el")
+(load "pacmacs-image.el")
+(load "pacmacs-utils.el")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]