% This buffer is for notes you don't want to save. % If you want to create a file, visit that file with C-x C-f, % then enter the text in that file's own buffer. start:- nxt_open, drive2(100,1). drive(X,Y) :- nxt_light(Z),Z>20, nxt_go_cm(X,Y), drive(X,Y). drive(X,Y) :- nxt_light(Z),Z<20, nxt_rotate(100,120), drive(X,Y). drive(X,Y) :- nxt_sound(U), U>15,nxt_rotate(100,90), nxt_stop. drive2(X,Y) :- nxt_sound(Z),Z>50, nxt_go_cm(X,Y), drive(X,Y). drive2(X,Y) :- nxt_sound(Z),Z<50, nxt_rotate(100,120), drive(X,Y).