a classic word game (a project of UC Berkeley CS9G : Java for Programmers)