-- Visual version of the mobile Medusa.

class V_MOBILE_MEDUSA

inherit

  V_MOBILE
  rename
    make as vgp_make
  undefine
    react, win, restart, clear,
    react_to_first_movement, init,
    customized_init, build_record, create_record
  redefine
    northwest, bitmap
  end

  MOBILE_MEDUSA
  redefine
    northwest, clear
  end

  V_MEDUSA
  undefine
    on_paint
  redefine
    bitmap
  end

 creation

  make_northbound, make_southbound, make_eastbound,
  make_westbound, make, make_customized

feature{NONE}

  bitmap : WEL_BITMAP

  get_bitmaps is
  do
    smiling := configuration.game_mobile_smiling_medusa_pixmap( Current )
    unsmiling := configuration.game_mobile_medusa_pixmap( Current )
    rock := configuration.rock_mobile_medusa_pixmap( Current )
    bitmap := unsmiling 
  end

  make( s : STRING ; vgr : V_GAME_ROOM ; c : V_GAME_CELL ; d : INTEGER ) is
  require
    d = configuration.Northbound or d = configuration.Southbound or
    d = configuration.Eastbound or d = configuration.Westbound
  do
    if d = configuration.Northbound then 
      make_northbound( s, vgr, c )
    elseif d = configuration.Southbound then 
      make_southbound( s, vgr, c )
    elseif d = configuration.Eastbound then 
      make_eastbound( s, vgr, c )
    else 
      make_westbound( s, vgr, c )
    end
  end

  make_northbound( s : STRING ; vgr : V_GAME_ROOM ; c : V_GAME_CELL ) is
  do
    id := configuration.northbound_medusa_code
    initial_direction := configuration.Northbound
    vgp_make( s, vgr, c )
  end

  make_southbound( s : STRING ; vgr : V_GAME_ROOM ; c : V_GAME_CELL ) is
  do
    id := configuration.southbound_medusa_code
    initial_direction := configuration.Southbound
    vgp_make( s, vgr, c )
  end

  make_eastbound( s : STRING ; vgr : V_GAME_ROOM ; c : V_GAME_CELL ) is
  do
    id := configuration.eastbound_medusa_code
    initial_direction := configuration.Eastbound
    vgp_make( s, vgr, c )
  end

  make_westbound( s : STRING ; vgr : V_GAME_ROOM ; c : V_GAME_CELL ) is
  do
    id := configuration.westbound_medusa_code
    initial_direction := configuration.Westbound
    vgp_make( s, vgr, c )
  end

  get_id is
  do
  end

feature

  northwest : V_GAME_CELL

  clear is
  do
    {MOBILE_MEDUSA}precursor -- Shouldn't need class name?
    destroy
  end

end 
