Bunner breaks free
Version 0.3
This third version doesn’t introduce a lot of change, but it does tie things together a bit by reuniting the previous two levels, and adding a third. We can now play through a whole 3-level game!
So, level 3 isn’t a whole lot more advanced than level 2, but we at least have free movement, now, and some of the code around levels and win conditions is getting tidied up.
One of the biggest changes has been to switch all input-handling to the keyup event, rather than a mix that also includes keypress. Keyboard-handling has an awful lot of complexity in javascript (repeating, bubbling, cancelling, etc.) so I’m just going to sidestep all of that, for now. I’m sure the issue will return in due course!
The new moveBunner() function ‘attempts’ to make a move, then reports whether or not it was successful. It also uses a very convoluted approach to locating Bunner’s position in the first place — this is a side-effect of the data structure I decided to use to store the object data, and this clunkiness will also be addressed soon.
Next up: maybe a nicer overall play area, properly flexible win conditions, some graphical tweaks; these are all probably next steps.