added factory class, refactored Game class