Redid game using a class to encapsulate logic.

Made the silly mistake of keeping logic and i/o together.  Will
have to break up the two for future developments.