zck avatar zck committed 37bf3d8

made 'minesweeper-++ take (row, col) args

Comments (0)

Files changed (1)

minesweeper-mode.el

 (defun minesweeper-inform-around (row col &optional amount)
   "takes in a square, and increases the values of all its empty neighbors by 'amount"
   (mapc (lambda (position)
-	  (minesweeper-++ (car position) (cdr position) amount))
+	  (minesweeper-++ (cdr position) (car position) amount))
 	(minesweeper-neighbors col row)))
 
-(defun minesweeper-++ (col row &optional amount)
+(defun minesweeper-++ (row col &optional amount)
   "Increments the value at square (row, col), unless the square is a bomb"
   (let ((val (minesweeper-view-mine row col 't)))
     (when (and (<= ?0 val)
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.