Etapa 1 inteira (logica com 100% de cobertura, cena 3D, toque, sons, bancada de desempenho, e2e) e a base da etapa 2 (mapa novo no Tiled, texturas, imagens dos itens, sons conferidos, golpe recortado e medido). Pagina /jogo fora do menu e do sitemap ate a medicao no celular.
27 lines
854 B
TypeScript
27 lines
854 B
TypeScript
import { problemaPorId } from "./problemas";
|
|
import type { Partida } from "./tipos";
|
|
import { LINHAS_DO_FEED } from "./valores";
|
|
|
|
type ComFeed = Pick<Partida, "feed" | "passo">;
|
|
|
|
export function registrar(p: ComFeed, texto: string): void {
|
|
p.feed.push({ passo: p.passo, texto });
|
|
if (p.feed.length > LINHAS_DO_FEED) {
|
|
p.feed.splice(0, p.feed.length - LINHAS_DO_FEED);
|
|
}
|
|
}
|
|
|
|
export function registrarEliminacao(
|
|
p: ComFeed,
|
|
problemaDoDrone: string,
|
|
problemaDoZumbi: string,
|
|
): void {
|
|
const solucao = problemaPorId(problemaDoDrone)?.solucao ?? problemaDoDrone;
|
|
const nome = problemaPorId(problemaDoZumbi)?.nome ?? problemaDoZumbi;
|
|
registrar(p, `${solucao} eliminou ${nome}`);
|
|
}
|
|
|
|
export function registrarResolvido(p: ComFeed, problemaId: string): void {
|
|
registrar(p, `Resolvido: ${problemaPorId(problemaId)?.nome ?? problemaId}`);
|
|
}
|