refactorings on 24 game