This PR converts the global variables defined in kiigame.js to instance variables of the engine class. It ensures that the variables are unique to each engine object and consistent with the engine state whenever the engine is instantiated.
Tested by verifying that Lätkäzombit can be played through without any errors and that custom rudimentary games can be created/played using the kged editor. Also checked that multiple instances of the engine class can be created without issues.
This PR converts the global variables defined in
kiigame.js
to instance variables of the engine class. It ensures that the variables are unique to each engine object and consistent with the engine state whenever the engine is instantiated.Tested by verifying that Lätkäzombit can be played through without any errors and that custom rudimentary games can be created/played using the kged editor. Also checked that multiple instances of the engine class can be created without issues.