% Script StarWalk

close all
figure
axis equal off
hold on
%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
x = 0;
y = 0;
DrawRect(-10,-10,20,20,'k')
for k=1:20
DrawStar(x,y,1,'y')
pause(.3)
DrawStar(x,y,1,'k')
z = rand(1);
if z<=.25
x = x+1;
elseif z<.50
y = y+1;
elseif x<.75
x=x-1;
else
y = y-1;
end
end
DrawStar(x,y,1,'r')