Copyright ã 1994 by Sean Luke

Fred
Fred Version 2.0
COWS Version 1.3
Sean Luke
March 20, 1994

Fred is an "improved" version of an old application I stuck on the net years ago.  The old version of Fred would follow the cursor around at varying speeds.  The new Fred does the same thing with the program I've supplied, albeit not as prettily and much slower.  You see, Fred has been retrofitted with the COWS interpreter (and, as it happens, basically the same COWS test bench, though this could change).

I think this is a fascinating example of how you could write NeXT programs using COWS, and change them on the fly.  True, it's slow for the while (the interpreter's not fast), but there are some really neat things that could be done here.  Try writing your own Fred programs.

Fred's Library

Fred has only two libraries:  the COWS Standard Library, and Fred's application library.  to learn about the COWS language and the Standard Library, read COWS Language Concepts.rtf.  Fred's little application library is described, function-by-function, below:

icon-x			Returns the x coordinate of Fred's app icon, where the bottom-
				left corner of the screen is (0.0, 0.0).
	(icon-x)
			
icon-y			Returns the y coordinate of Fred's app icon, where the bottom-
				left corner of the screen is (0.0, 0.0).
	(icon-y)
			
mouse-x			Returns the x coordinate of the mouse relative to Fred's app 
				icon's bottom-left corner (that is, assuming the icon's
				bottom-left corner is (0.0, 0.0)).
	(mouse-x)

mouse-y			Returns the y coordinate of the mouse relative to Fred's app 
				icon's bottom-left corner (that is, assuming the icon's
				bottom-left corner is (0.0, 0.0)).
	(mouse-x)	
				
move-icon		Moves Fred's app icon to (x-coord,y-coord), where the 
				bottom-left corner of the screen is (0.0, 0.0).
	(move-icon x-coord y-coord)