ex19 refactored game mechanicks to a separate file