gnu.app.displayhack
Class Munch

java.lang.Object
  extended by gnu.app.Application
      extended by gnu.x11.Application
          extended by gnu.app.displayhack.DisplayHack
              extended by 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

Field Summary
 long draw_delay
           
 int min_size
           
 boolean shift
           
 int square_count
           
 boolean xor
           
 
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
 
Fields inherited from class gnu.x11.Application
display
 
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
 

Field Detail

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
Constructor Detail

Munch

public Munch(java.lang.String[] args)
Method Detail

paint

public void paint()
Specified by:
paint in class DisplayHack

main

public static void main(java.lang.String[] args)