diff --git a/lisp/2048.el b/lisp/2048.el index 35695dd..1937bf3 100644 --- a/lisp/2048.el +++ b/lisp/2048.el @@ -80,6 +80,9 @@ The cells consist of FILLER and are separated by DELIMITER." 2048--vertical-sep-char (string-to-char " ") 2048--board-size 2048--cell-width)) (defun 2048--pad (number) + "Pad NUMBER with spaces, to fit inside the 2048 grid. + +TODO: rewrite with calculations based on `2048--cell-width's other than 6." (cond ((= number 0) " ") ((< number 10) (format " %i " number)) @@ -283,9 +286,11 @@ the 2048-shift function. Slides and merges for four directions." ) (defun 2048-check-total-diff () - "Run 2048-check-diff on the whole board. Return t/nil if board has changed -or not. Only relevant after 2048-push-board is called and modifications are -made to the 2048-board array." + "Run 2048-check-diff on the whole board. + +Return t/nil if board has changed or not. Only relevant after +2048-push-board is called and modifications are made to the +2048-board array." (catch 'breaker (dotimes (j 2048--board-size) (dotimes (i 2048--board-size)