                             content))]
       characters))))
 
+(defn markup->length
+  [s]
+  (count (markup->chars 0 0 s)))
+
 (defn put-string
   ([^robinson.aterminal.ATerminal screen x y string]
      (put-string screen x y string :white :black #{}))

                           (> thirst max-thirst) "not drinking enough water"
                           (<= will-to-live 0)   "just giving up on life"
                           :else                 "mysterious causes"))]
    (render-list screen 16 4 53 6
      (concat
        [{:s "" :fg :black :bg :white :style #{}}]
        (map


(defn center-markup [s width]
  (let [n-ws-left (int (/ (- width (markup-length s)) 2))
        n-ws-right (int (+ 1.6 (/ (- width (markup-length s)) 2)))]
   (apply str (concat (repeat n-ws-left " ") s (repeat n-ws-right " ")))))

(defn left-justify-markup [s width]
