classicagamelogic refactored