public Word getWord(IWordPredicate test)
   {  int r = (int) (Math.random() * this.numUsed);
   
      // check the end of the array
      for (int i = r; i < this.numUsed; i++)
      {  if (test.isOK(this.words[i]))
         {  return this.words[i];	
         }
      }
   	
      // nothing in the end of the array;  check the beginning
      for (int i = 0; i < r; i++)
      {  if (test.isOK(this.words[i]))
         {  return this.words[i];	
         }
      }
      
      // didn't find one
      return null;
   }