Commits

zck committed 48dabc4

made 'pick take (row, col) args.

Comments (0)

Files changed (1)

minesweeper-mode.el

 		       (list 'face
 			     (minesweeper-get-face val))))
 
-(defun minesweeper-pick (col row)
-  "Reveals the square at position (col, row). If the square is zero,  pick all the neighbors around (col, row)."
-  (minesweeper-debug "starting pick with args:" (number-to-string col) " " (number-to-string row))
+(defun minesweeper-pick (row col)
+  "Reveals the square at position (row, col). If the square is zero,  pick all the neighbors around (col, row)."
+  (minesweeper-debug "starting pick with args:" (number-to-string row) " " (number-to-string col))
   (unless (or (not (minesweeper-in-bounds row col))
 	      (minesweeper-is-revealed row col)
 	      (minesweeper-marked row col))
   (unless *minesweeper-game-over*
     (multiple-value-bind (row col in-bounds) (minesweeper-position)
       (when in-bounds
-        (catch 'game-end (minesweeper-pick col row)
+        (catch 'game-end (minesweeper-pick row col)
                (if (eq (minesweeper-view-mine row col) ?0)
                    (minesweeper-print-field)
                  (minesweeper-refresh-square row col))))
   (when (minesweeper-neighbors-bounds row col)
     (mapc '(lambda (position)
 	     (minesweeper-debug "called pick-around-helper " (number-to-string col) " " (number-to-string row))
-	     (minesweeper-pick (car position) (cdr position)))
+	     (minesweeper-pick (cdr position) (car position)))
 	  (minesweeper-neighbors row col))))
 
 (defun minesweeper-lose-game (col row)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.