   ])
   battle_field.add_terrain(HomeTerrain, 240, 480)
 
+  document.battle_field = battle_field
+
   ui = new UI(battle_field)
   # ui.reset_zindex()
 

  space_collide: (x1, y1, x2, y2) ->
    [x3, y3, x4, y4] = @space()
    return false if (x4 <= x1 or y4 <= y1 or x3 >= x2 or y3 >= y2)
    return @_insect(x1, y1, x2, y2, x3, y3, x4, y4)
  set_display_object: (@display_object) ->
  update: () ->
  integration: (delta_time) ->
  handle_destroy: () ->
    @battle_field.remove_battle_field_object(this)

class MovableBattleFieldObject extends BattleFieldObject
  x: () ->


class GrassTerrain extends Terrain
  enterable: (battle_field_object) -> true
  type: -> "grass"
  layer: 2

