Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ruleset check_for_door
- contains can_we_move_up,we_have_no_key.
- rule can_we_move_up
- if hero_x is 4 and
- hero_y is 4 and
- hero_has_key is 1
- then start2.
- rule we_have_no_key
- if hero_x is 4 and
- hero_y is 4 and
- hero_has_key is 0 and
- key1`s key_x is not null
- then update_status('You need the key to go up to the next level').
- ruleset check_for_key
- contains did_we_find_a_key.
- rule did_we_find_a_key
- if hero_x is key1`s key_x and
- hero_y is key1`s key_y then
- hero_has_key becomes 1 and
- update_status('You found a key!') and
- key1`s key_x becomes null and
- key1`s key_y becomes null.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement