package com.mssngvwls;

import org.springframework.stereotype.Service;

@Service
public class GameFactory {

    private final GamePhraseSelector phraseSelector;

    public GameFactory(final GamePhraseSelector phraseSelector) {
        this.phraseSelector = phraseSelector;
    }

    public GameState startGame(final int numberOfCategories, final int numberOfPhrasesPerCategory) {
        return new Game(phraseSelector).startGame(numberOfCategories, numberOfPhrasesPerCategory);
    }
}

package com.mssngvwls;

import org.springframework.stereotype.Service;

@Service
public class GameFactory {

    private final GamePhraseSelector phraseSelector;

    public GameFactory(final GamePhraseSelector phraseSelector) {
        this.phraseSelector = phraseSelector;
    }

    public Game createGame() {
        return new Game(phraseSelector);
    }
}

Return the Game object from the factory as we need it to be able to guess phrases