To jest stara wersja strony!


?
start :-
	write('-- start 0.1 --'),
	nxt_goal(ewka, my_actions).
 
my_actions :-
	nxt_light_LED(passivate),
	gogo.
 
gogo :-
	stop,
	trigger_create(_, check, checked),
	nxt_go(250).
 
check :-
	nxt_light(V, force),
	V < 20.
 
checked :-
	nxt_light(V, force),
	decide(V),
	stop.
 
decide(V) :-
	V < 12,!,
	write('black\n'),
	escape.
 
decide(V) :-
	V >= 12,!,
	write('red\n'),
	escape.
 
escape :-
	Angle is 150 + random(60), 
	nxt_rotate(100, Angle, force),
	gogo.
 
stop :-
	trigger_killall,
	nxt_stop.
 
readcolor :-
	nxt_light_LED(activate),
	nxt_light(V1),
	nxt_light_LED(passivate),
	nxt_light(V2),
	D is V1 - V2,
	write(V1),write(' '),write(V2),write(' '),write(D),write('\n').
pl/dydaktyka/piw/2010/sprawozdania/piw20100609-17c.1276100576.txt.gz · ostatnio zmienione: 2019/06/27 15:54 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0