-- Visual version of the Anaconda.

class V_ANACONDA

inherit

  V_MOBILE
  rename
    make as vm_make
  undefine
    react, win, restart, clear, init,
    react_to_first_movement, try_north,
    try_south, try_east, try_west, receive_bullet,
    customized_init, raise, build_record, create_record
  redefine
    northwest, room
  end

  V_CHANGELING
  rename
    vacate as depart, occupy as visit
  undefine
    depart, react, react_to_first_movement, win,
    on_paint, restart, wake_up, init, clear, receive_bullet, 
    build_record, create_record, customized_init

  redefine
    northwest, room, egg
  end

  ANACONDA
  redefine
    northwest, room, egg
  end

creation

  make, make_customized

feature{NONE}

  east, west : WEL_BITMAP

  display_east is
  do
    if bitmap /= east then
      bitmap := east
      invalidate
    end
  end

  display_west is
  do
    if bitmap /= west then
     bitmap := west
      invalidate
    end
  end

  get_bitmaps is
  do
    east := configuration.game_anaconda_east_pixmap( Current )
    west := configuration.game_anaconda_west_pixmap( Current )
    bitmap := east 
  end

  make( s : STRING ; vgr : V_GAME_ROOM ; c : V_GAME_CELL ) is
  do
    vm_make( s, vgr, c )
  ensure then
    present
  end  

  get_id is
  do
    id := configuration.anaconda_code
  end

  vanish is
  do 
    hide
  end

  appear is
  do
    show
  end

feature

  egg : V_EGG
  northwest : V_GAME_CELL
  room : V_GAME_ROOM

end 
