Partly a lack of structs/classes, partly because your code is a bit hard to follow
e.g. one or two really long lines, several long/complex expressions, various bits of repetition, using (-x + 59
instead of the equivalent 59 - x
, returning 0
and 1
instead of false
and true
several other things.
Might just be because it’s a draft or because of stylistic difference/preference. If Lua is the only language you have significant experience with that would sort of explain the lack of classes, as would being new to C and C++.
Lua’s a nice language, I learnt Lua to use with ComputerCraft (a Minecraft mod) a few years back. It’s still my favourite scripting language (unless you count C#, but I’ve only seen that used for scripting once).
I meant @adekto :P
.
That’s good to know though.
I’m a pretty strong believer in self-education (i.e. learning from internet tutorials and articles), so do not worry about not learning programming at school.
Most of my programming knowledge comes from the internet and practise, my college wasn’t the best for teaching programming.
I had to learn both French and German despite telling them I only wanted to learn French. I don’t know either well enough to hold a conversation but still got a ‘C’ in both.
While we’re at it I may as well say what my background is.
I’ve been programming for about 4-5 years now.
I have varying levels of experience with roughly 10 different languages.
(C# and C++ are my main two, the ones I like most as well as the ones I use most.)
85% to 95% of my programming knowledge has been learned from the internet, lots of practise and occaisionally a book or two.
My college didn’t really teach me that much about programming, the internet was a much better teacher.