gnu.app.displayhack
Class Munch
java.lang.Object
gnu.app.Application
gnu.x11.Application
gnu.app.displayhack.DisplayHack
gnu.app.displayhack.Munch
- All Implemented Interfaces:
- java.lang.Runnable
public class Munch
- extends DisplayHack
Munching squares. It performs the munching squares hack until killed. It
picks square size, position, and gravity randomly. It consists of drawing
Y = X XOR T for a range of X and T over and over until all the possible
combinations of X and T have come up. It was reportedly discovered by
Jackson Wright in 1962 and took 5 instructions of PDP-6 code.
Modified from munch.c
in xscreensaver by Tim Showalter
. Cleaned up to used eraser.
- See Also:
-
jargon file,
hakem,
screenshot 8,
help output
Fields inherited from class gnu.app.displayhack.DisplayHack |
clear, colors, delay, erase, eraser_delay, eraser_delta, eraser_gc, eraser_mode, gc, gc_values, random, stop_now, thread, window |
Constructor Summary |
Munch(java.lang.String[] args)
|
Method Summary |
static void |
main(java.lang.String[] args)
|
void |
paint()
|
Methods inherited from class gnu.app.displayhack.DisplayHack |
about, chance, dispatch_event, erase, exec, exit, random_color, random_int, random_sign, restart, run, sleep |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
draw_delay
public long draw_delay
square_count
public int square_count
min_size
public int min_size
xor
public boolean xor
shift
public boolean shift
Munch
public Munch(java.lang.String[] args)
paint
public void paint()
- Specified by:
paint
in class DisplayHack
main
public static void main(java.lang.String[] args)