const caroshark = new Caroshark({ level: 2 });
Caroshark.inFilesMap = (str: string): LevelData => {
return (new Parser(str.split("\n").map((x) => x.trim())))
.number("n")
.numbers("a b")
.numbers("m")
.string("path")
.lines("commands", 'n', (line: string) => line.split(' '))
.build();
}
- duplica folderul
levels/levelTemplate
- renumeste in
levelN
ex. level1, level2 ... - Pune fisiere .in in
levelN/in/
- Actualizeaza variabila level in
src/index.tsx
Citesteste si scrie(consola) doar fisierul de test. Live update
npm run ex
Citesteste si scrie(consola) doar fisierul de in. Live update
npm run dev
Citesteste si scrie(fisiere) doar fisierul de in. Executa doar odata
npm run sol