The first thing you need to do is add a new object to the
Importstatement for the
Import mainClass Import cityClass
We have added an
Import statement for our new
cityClass.monkey file to the
gameClasses.monkey file. As we only import
gameClasses.monkey in all of our scripts, the new class will be automatically visible in them, and so will all the other objects we create later on too.
Ok, now comes the actual fun part. First, we want to to create some cities in our game. For this, we have created the
CreateCity function. To set up the ...