Refactoring on branch game