Refactored game and domain using prototypical inheritance