
-----------------------------------
SpadeZAceZ
Mon Jan 18, 2010 4:23 pm

Having a problem with The &quot;brownianMotion&quot; program. Thanks
-----------------------------------
What is it you are trying to achieve?
What i am currently trying to achieve is, modifying the BrownianMotion program, arrange that a picture of a funny face is moved randomly around the window.


What is the problem you are having?
I am not sure on how to create a picture of a funny face and having no idea how to move it around the window. 

Describe what you have tried to solve this problem
I attempted to create a funny face and failed very bad. 


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)




% The "BrownianMotion" program
% Moves an asterisk around on
% the window like a smoke particle
% This is known as Brownian motion
% Color window green
colorback (green)
for row : 1 .. 25
    put repeat (" ", 80) ..
end for

% Set character color to magenta
color (magenta)
setscreen ("nocursor") % Hide cursor
loop
    % Start at center
    var row := 13
    var column := 40
    loop
	% Start over when asterisk goes off the window
	exit when column < 1 or column > 80
	    or row < 1 or row > 25
	locate (row, column)
	put "*" ..
	delay (100)
	% Erase asterisk in old location by
	% outputting a blank there
	locate (row, column)
	put " " ..
	% Compute new value for row
	randint (row, row - 1, row + 1)
	% Compute new value for column
	randint (column, column - 1, column + 1)
    end loop
    play (">CC