   
   (doseq [[row] board]
     (doseq [[elem] row]
-      (add elem))))
+      (add-element elem))))
 
 ; REM: add the add function which will call add-apple or add-snake
  (:use snake.terminal)
  (:require [clojure.contrib.string :as string]))

(defn draw-boarder
  "Draws the surrounding border of the board."
  [{width :width height :height}]
  

  (put (string/repeat width "-"))
  (put "/"))

(defmulti add-element :type)
  (defmethod add-element :apple
    [{x :x y :y}]
    
    (set-cursor (+ x 1) (+ y 1))
    (put "o"))
  (defmethod add-element :snake
    [{x :x y :y}]
    
    (set-cursor (+ x 1) (+ y 1))
    (put "#"))

(defn remove-element
  [{x :x y :y}]
  
  (set-cursor (+ x 1) (+ y 1))
