From 2bf9d347946b90fcb5135742bd883c18e9f9497f Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 16 Aug 2014 21:50:18 +0100 Subject: [PATCH] Found a serious fault in display.clj because marginalia picked it up. Hadn't been picked up otherwise because (1) I hadn't written any unit tests for it, and (2) it isn't actually used by anything. Should possibly be deleted. --- src/mw_engine/display.clj | 2 +- src/mw_engine/world.clj | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mw_engine/display.clj b/src/mw_engine/display.clj index f77a983..0ad65e6 100644 --- a/src/mw_engine/display.clj +++ b/src/mw_engine/display.clj @@ -35,4 +35,4 @@ [world] (apply vector (cons :table - (map render-world-row world))) + (map render-world-row world)))) diff --git a/src/mw_engine/world.clj b/src/mw_engine/world.clj index 97f4f21..2aa515f 100644 --- a/src/mw_engine/world.clj +++ b/src/mw_engine/world.clj @@ -30,13 +30,14 @@ true (cons (make-cell index height) (make-world-row (inc index) width height)))) -(defn- make-world-rows [index width height] +(defn- make-world-rows "Make the (remaining) rows in a world of this width and height, from this index. * `index` y coordinate of the next row to be created; * `width` total width of the matrix, in cells; * `height` total height of the matrix, in cells." + [index width height] (cond (= index height) nil true (cons (apply vector (make-world-row 0 width index)) (make-world-rows (inc index) width height))))