diff --git a/src/zaxage_demo_01.prog.abap b/src/zaxage_demo_01.prog.abap index 67a3752..dfb2a10 100644 --- a/src/zaxage_demo_01.prog.abap +++ b/src/zaxage_demo_01.prog.abap @@ -72,14 +72,14 @@ CLASS main IMPLEMENTATION. engine = NEW #( ). - DATA(entrance) = NEW room( - name = 'Entrance' + DATA(entrance) = NEW room( + name = 'Entrance' descr = 'You are in the entrance area. Welcome.' ). - DATA(developer) = NEW room( - name = 'Developers office' + DATA(developer) = NEW room( + name = 'Developers office' descr = 'The developers area. be quiet!' ). - DATA(consulting) = NEW room( - name = 'Consulting Department' + DATA(consulting) = NEW room( + name = 'Consulting Department' descr = 'This is the area where the consultants work. Bring coffee!' ). engine->map->add_room( entrance ). @@ -153,7 +153,8 @@ CLASS main IMPLEMENTATION. result->add( |You are in the { engine->player->location->name }.| ). " { player->location->description }|. text->set_textstream( result->get( ) ). - IF engine->player->location->things->exists( 'RFC' ). + IF engine->player->location = bill_developer->location AND + engine->player->location->things->exists( 'RFC' ). engine->mission_completed = abap_true. ENDIF. diff --git a/src/zcl_axage_demo1.clas.abap b/src/zcl_axage_demo1.clas.abap index b1dca40..22f1291 100644 --- a/src/zcl_axage_demo1.clas.abap +++ b/src/zcl_axage_demo1.clas.abap @@ -97,7 +97,8 @@ CLASS zcl_axage_demo1 IMPLEMENTATION. out->write( interprete( 'EAST' )->get( ) ). out->write( interprete( 'TAKE KNIFE' )->get( ) ). - IF engine->player->location->things->exists( 'RFC' ). + IF engine->player->location = bill_developer->location AND + engine->player->location->things->exists( 'RFC' ). engine->mission_completed = abap_true. out->write( 'Congratulations! You delivered the RFC to the developers!' ). ENDIF.