Skip to content

Add pathway to the moon.#75

Open
rhysdav wants to merge 1 commit intoksundberg:masterfrom
rhysdav:master
Open

Add pathway to the moon.#75
rhysdav wants to merge 1 commit intoksundberg:masterfrom
rhysdav:master

Conversation

@rhysdav
Copy link

@rhysdav rhysdav commented Nov 29, 2019

Enjoyed working on this, though I would highly recommend not actually merging, as in order to work properly the following predicates are also required (one of them is a specialized move/go, which is why it's not included in my commit).

`
:- dynamic door/2.

go_now(rocket):-here(moon), retract(here(moon)), assert(here(rocket)), retract(here(rocket)), asserta(here(moon)), !.

push(button):-here(rocket), puzzle(moon), asserta(door(moon,rocket)), retract(door(rocket, hangar)), go_now(moon), !.
push(button):-here(moon), retract(door(moon,rocket)), asserta(door(rocket, hangar)), go_now(hangar), !.
push(_):-write("What button?"), !, fail.
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant