Concurrency Experiment--Lots of Threads

The applet has 24 * 24 = 576 threads for the little squares, and a display thread that updates the screen via a Timer, every *25* msec. Note the lighter squares move more quickly than the darker squares. Each thread has its own Thread.sleep() value in between updates. There is no "game loop" per se.

Collision detection is done via a 2D array that matches the display area, allowing each pixel to be locked and a marker for the occupying object to be stored. The individual "Actor" threads consult this array before allowing a move.