Territories

Mindtools Home











Flash Player

This site makes use of the Macromedia Flash plugin to display videos.

Click here to download the Macromedia Flash player.


Video Tutorials

Wherever you see the eye icon on this site,
it is a link to a video tutorial.

 

 

Create Territories

We will create territories by drawing different coloured regions in SpaceLand.  Devils generally move around and stay within their own territory.

Switch to SpaceLand, and use the zoom button to zoom out so that you can see the whole land.

Click the Edit Terrain button.

Use the mouse to select a region, then click the colour palette to make it a different colour.

 

Stay In Territory

Devils should generally stay in their own territory.  To make them do this, we will create a variable called previous patch colour and store the colour of the ground the Devil is on before it moves. 
Next we will slightly alter the Devils Move procedure to record the colour of the ground the Devil is on before it moves.
Now we will make a procedure that compares the patch colour after the Devil has moved a step with what is stored in previous patch colour.  If it is different, then the Devil has moved out of its territory.  We will make it turn around 180 degrees and take 3 steps.  This should return it to its original territory. 

Finally, switch to the Runtime workspace and add in the Stay in Territory procedure to the Forever block.

Switch to SpaceLand to test your simulation.


This page has been produced by Margaret Meijers.  Questions concerning its content may be directed by email to margaret.meijers@education.tas.gov.au.  This page was last modified on Tuesday, 05 August 2008. The URL for this page is http://www.mindtools.tased.edu.au/starlogo_tng/territories.htm .

 Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.
Attribution should include the statement: "This has been adapted from a resource originally created by Margaret Meijers at http://www.mindtools.tased.edu.au"