refactored game class to use actual instance variables instead of class variables.