GameLogic refactored and new tests added