Commits

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)