       S.circle {
         class: "head"
         cx: head, cy: y
-        r: half
+        r: half_width
         fill: "#00aa00"
       }
+      S.g {class: "legs"}, [
+        draw_leg(x+half_width, y+half_width)
+        draw_leg(x-width, y+half_width)
+        draw_leg(x+half_width, y-3*half_width)
+        draw_leg(x-width, y-3*half_width)
+      ]
     ]
   [
     S.rect {

    x = i*cell_size
    y = j*cell_size
    head = x + length
    half = width / 2
    S.g {class: "turtle"}, [
      S.ellipse {
        class: "body"

      stroke: "#ffffff"
    }
  draw_leg = (x, y) ->
    size = cell_size * 0.5
    S.rect {
      x: x
      y: y
