Advertisement
Guest User

Untitled

a guest
Jun 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.29 KB | None | 0 0
  1. move([Disc],X,Y,_) :-  
  2.     write('Move disk '),
  3.     write(Disc),
  4.     write(' from '),
  5.     write(X),
  6.     write(' to '),
  7.     write(Y),
  8.     nl.
  9. move([Bottom|Rest],Start,Swap,Goal) :-
  10.     move(Rest,Start,Swap,Goal),
  11.     move([Bottom],Start,Goal,_),
  12.     move(Rest,Swap,Goal,Start).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement