async getAiSign()

in src/app/pages/game/services/ai-strategies/markov-strategy.service.ts [30:43]


  async getAiSign(): Promise<Signs> {
    const pastPlayerMoves = this.gameHandler
      .pastPlayerMoves()
      .map((gesture) => gesture.name)
      .join(', ');
    const lastPlayed = this.getLastPlayed();

    this.buildMarkovChain(lastPlayed);

    const additionalInformation = `${pastPlayerMoves.length > 0 ? `Recent player moves were (from oldest to newest) [${pastPlayerMoves}]` : ``}.
      ${this.buildPromptBasedOnMarkovChain()}`;

    return this.getSign(additionalInformation);
  }