created class for game. moved most of main to that.