   height: () -> @area.y2 - @area.y1
 
   destroy: () ->
+    @destroy_display()
+    @map.delete_map_unit(this)
+
+  destroy_display: () ->
     @display_object.remove()
-    @map.delete_map_unit(this)
+
   accept: (other_unit) -> @model.accept(other_unit.model)
 
   update: () ->

      when 0
        new MapArea2D(@area.x1, @area.y1 - @default_height/4, @area.x2, @area.y1)
      when 90
        new MapArea2D(@area.x2, @area.y1, @area.y2 + @default_width/4, @area.y2)
      when 180
        new MapArea2D(@area.x1, @area.y2, @area.x2, @area.y2 + @default_height/4)
      when 270
        new MapArea2D(@area.x1 - @default_width/4, @area.y1, @area.x1, @area.y2)

class MapUnit2DForStupidTank extends MapUnit2DForTank
  current_frames: () ->


  battle_field.add_terrain(HomeTerrain, new MapArea2D(240, 480, 280, 520))

  # set a reference for easier debug
  document.battle_field = battle_field

  console.log "init done"
