program raf105;
uses robot;
var l,d,r,u: boolean;
begin
task('if8');
l:= wallfromleft;
d:= wallfromdown;
r:= wallfromright;
u:= wallfromup;
if l
then begin right; paint; right; paint;
if freefromright
then begin right; paint; end
end;
if d
then begin up; paint; up; paint;
if freefromup
then begin up; paint; end
if r
then begin left; paint; left; paint;
if freefromleft
then begin left; paint; end
if u
then begin down; paint; down; paint;
if freefromdown
then begin down; paint; end
end.
var l,r: boolean;
task('if9');
right; r:= wallfromdown;
left;
left; l:= wallfromup;
right;
if r and l
then begin up; paint; down; down; paint; up; end
else paint;
task('if10');
right; r:= cellispainted;
left; l:= cellispainted;
if r or l
program raf105;
uses robot;
var l,d,r,u: boolean;
begin
task('if8');
l:= wallfromleft;
d:= wallfromdown;
r:= wallfromright;
u:= wallfromup;
if l
then begin right; paint; right; paint;
if freefromright
then begin right; paint; end
end;
if d
then begin up; paint; up; paint;
if freefromup
then begin up; paint; end
end;
if r
then begin left; paint; left; paint;
if freefromleft
then begin left; paint; end
end;
if u
then begin down; paint; down; paint;
if freefromdown
then begin down; paint; end
end;
end.
if9program raf105;
uses robot;
var l,r: boolean;
begin
task('if9');
right; r:= wallfromdown;
left;
left; l:= wallfromup;
right;
if r and l
then begin up; paint; down; down; paint; up; end
else paint;
end.
if10program raf105;
uses robot;
var l,r: boolean;
begin
task('if10');
right; r:= cellispainted;
left;
left; l:= cellispainted;
right;
if r or l
then begin up; paint; end
else paint;
end.