The script
Thai does not write its tones: it lets you compute them.
Why this works
Four facts decide it: the class of the initial consonant, whether the syllable is live or dead, the length of the vowel, and the tone mark. Everything else in this course rests on that.