Hassan Schroeder wrote:
I'd suggest looking at the Observer pattern.
> 
> Have each Ball continuously register its location (x,y) with a single
> Observer object; an attempt to register to an occupied location can
> be handled however you want -- throw an exception, send the Ball
> a message to reverse direction, vaporize the Ball, etc.
> 
> No loops or iterators in sight  :-)
> 
> FWIW,

Awesome! Thanx
-- 
Posted via http://www.ruby-forum.com/.