Transfer code (#1)

* copy project root files

* import previously created code and rename where needed

* fix license and lint

* main is now just a JS wrapper

* minified main.cjs rather than copying to a newly named file
This commit is contained in:
2026-05-28 12:35:03 +02:00
committed by GitHub
parent 1561720e5f
commit 79155255f6
38 changed files with 1850 additions and 10 deletions
+32
View File
@@ -0,0 +1,32 @@
let nag_to_tex nag =
match nag with
(* Move Assessments *)
| "$1" -> "!" (* Good move *)
| "$2" -> "?" (* Poor move *)
| "$3" -> "!!" (* Very good move *)
| "$4" -> "??" (* Very poor move *)
| "$5" -> "!?" (* Speculative move *)
| "$6" -> "?!" (* Questionable move *)
(* | 7 -> "\\Box" Forced move *)
(* | 8 -> "{\\tiny \\textceltel}" Singular move *)
(* | 9 -> "{\\tiny !!}" Worst move *)
(* Positional Assessments *)
| "$10" -> "=" (* Drawish / Equal *)
(* | 11 -> "=" Equal/Quiet *)
| "$13" -> "\\infty" (* Unclear *)
| "$14" -> "\\wbetter" (* White slight advantage *)
| "$15" -> "\\bbetter" (* Black slight advantage *)
| "$16" -> "\\ensuremath{\\pm}" (* White moderate advantage *)
| "$17" -> "\\ensuremath{\\mp}" (* Black moderate advantage *)
| "$18" -> "+-" (* White decisive advantage *)
| "$19" -> "-+" (* Black decisive advantage *)
(* Common Positional Symbols *)
| "$22" -> "\\zugzwang"
| "$32" -> "\\development"
| "$36" -> "\\initiative"
| "$40" -> "\\attack"
| "$44" -> "\\compensation"
| "$132" -> "\\counterplay"
(* | 146 -> "N" Novelty *)
(* Fallback for others: just print the $ number as a comment or ignore *)
| n -> ""