

deferred class GAME_PORTAL

inherit

  PORTAL -- Common code
  end

  SESSILE
  redefine
    customized_init, will_accept_stooge, build_record
  end

feature{NONE} -- save/restore

  customized_init( r : like room ; pr : like record ) is
  local
    linkable_piece : GAME_PIECE
    linkable_mate  : like Current
  do
    precursor( r, pr )
    occupy( northwest )

    pr.forth
    link_id := pr.item

    linkable_piece := r.find_linkable_mate( link_id )
    linkable_mate ?= linkable_piece
    if linkable_mate /= Void then
      set_link_id( link_id )
      set_link_mate( linkable_mate )
      linkable_mate.set_link_id( link_id )
      linkable_mate.set_link_mate( Current )
    end

  end

feature

  blocks_glare : BOOLEAN is True
  blocks_shots : BOOLEAN is True

  will_accept_stooge : BOOLEAN is  True

  build_record is
-- from GAME_PIECE through SESSILE
-- 1 id
-- 2 row
-- 3 col
-- from PORTAL
-- 4 link_id                     

  do
    precursor
    record.extend( link_id )
  ensure then
    proper_num_rec: record.count > 3
  end -- build_record

end 

