What an interesting and strange childhood you must have had to be writing games in Pascal before you heard about cosine. Either your schooling was great or terrible!
And it really doesn't take much to learn programming in class 5 or 6...
I believe my teachers were pretty good, overall. At least as good as can be expected.