refactored game class. created input class for handling key hits.