-- Visual version of the Medusa. Needs to be able to display smiling and -- nonsmiling versions of the Medusa. deferred class V_MEDUSA inherit PUZZLE_COMPONENT WEL_CONTROL_WINDOW rename make as wc_make, restore as wc_restore undefine class_background end -- V_GAME_PIECE -- undefine -- react, win, restart -- redefine -- northwest -- end -- MEDUSA -- undefine -- clear -- redefine -- northwest -- end -- Inheriting from MEDUSA here seems to do nothing but complicate the -- inheritance structure, so we abjure it. feature{NONE} bitmap : WEL_BITMAP vanish is do hide end appear is do show end smiling, unsmiling, rock : WEL_BITMAP display_smile is do if bitmap /= smiling then bitmap := smiling invalidate end end display_frown is do if bitmap /= unsmiling then bitmap := unsmiling invalidate end end display_rock is do bitmap := rock invalidate end display_medusa is do bitmap := unsmiling invalidate end feature end