Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- move([Disc],X,Y,_) :-
- write('Move disk '),
- write(Disc),
- write(' from '),
- write(X),
- write(' to '),
- write(Y),
- nl.
- move([Bottom|Rest],Start,Swap,Goal) :-
- move(Rest,Start,Swap,Goal),
- move([Bottom],Start,Goal,_),
- move(Rest,Swap,Goal,Start).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement