add templates

This commit is contained in:
2026-06-24 21:00:19 -03:00
parent f80223e0ed
commit b210ed4f92
17 changed files with 866 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { BaseGameValidator } from "../../../../shared/BaseGameValidator";
export class Exemplo2Validator extends BaseGameValidator {
validatePhase(history, config, gameConfig, sceneRef) {
const esperado = config?.textoEsperado || "SOBERANIA DIGITAL";
const atual = sceneRef?.textoAtual ?? "";
if (atual === esperado) return this.success();
const msgErro =
atual && typeof gameConfig?.mensagens?.textoErrado === "function"
? gameConfig.mensagens.textoErrado(atual, esperado)
: `Texto incorreto: "${atual}". O esperado é "${esperado}".`;
return this.failure(msgErro);
}
}
export function validationSolution(history, config, gameConfig, sceneRef) {
const validator = new Exemplo2Validator();
return validator.validate(history, config, gameConfig, sceneRef);
}