<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Turtlezero</id>
	<title>MiniScript Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Turtlezero"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/wiki/Special:Contributions/Turtlezero"/>
	<updated>2026-04-28T19:25:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=If&amp;diff=1355</id>
		<title>If</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=If&amp;diff=1355"/>
		<updated>2025-02-17T15:37:38Z</updated>

		<summary type="html">&lt;p&gt;Turtlezero: added link to orphaned &amp;quot;end if&amp;quot; page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;if&amp;lt;/c&amp;gt; is the [[:Category:Keywords|keyword]] that begins an ''if block''.  Use an &amp;lt;c&amp;gt;if…then&amp;lt;/c&amp;gt; statement to specify some condition under which the following statements should be executed. Use &amp;quot;[[end if]]&amp;quot; to end the if-block. The basic syntax is:&lt;br /&gt;
&lt;br /&gt;
:'''if''' ''condition'' '''then'''&lt;br /&gt;
:…&lt;br /&gt;
:'''end if'''&lt;br /&gt;
&lt;br /&gt;
When the condition is not true, MiniScript will jump directly to the &amp;lt;c&amp;gt;end if&amp;lt;/c&amp;gt; statement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;if x == 42 then&lt;br /&gt;
   print &amp;quot;I have found the Ultimate Answer!&amp;quot;&lt;br /&gt;
end if&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The whole set of lines, from &amp;lt;c&amp;gt;if…then&amp;lt;/c&amp;gt; to &amp;lt;c&amp;gt;end if&amp;lt;/c&amp;gt;, is known as an ''if block''.&lt;br /&gt;
Sometimes you want to do something else when the specified condition is not true. You can&lt;br /&gt;
specify this with an ''else block'' before the &amp;lt;c&amp;gt;end if&amp;lt;/c&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;if x == 42 then&lt;br /&gt;
   print &amp;quot;I have found the Ultimate Answer!&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
   print &amp;quot;I am still searching.&amp;quot;&lt;br /&gt;
end if&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you can check for additional conditions by adding ''else-if blocks'' as needed. Here's a&lt;br /&gt;
slightly more practical example that converts a number to words.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;if apples == 0 then&lt;br /&gt;
   print &amp;quot;You have no apples.&amp;quot;&lt;br /&gt;
else if apples == 1 then&lt;br /&gt;
   print &amp;quot;You have one apple.&amp;quot;&lt;br /&gt;
else if apples &amp;gt; 10 then&lt;br /&gt;
   print &amp;quot;You have a lot of apples!&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
   print &amp;quot;You have &amp;quot; + apples + &amp;quot; apples.&amp;quot;&lt;br /&gt;
end if&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the first condition that matches will execute its block of lines. If none of the&lt;br /&gt;
conditions match, then the &amp;lt;c&amp;gt;else&amp;lt;/c&amp;gt; block will run instead.&lt;br /&gt;
&lt;br /&gt;
Note that for all these forms, the &amp;lt;c&amp;gt;if&amp;lt;/c&amp;gt;, &amp;lt;c&amp;gt;else if&amp;lt;/c&amp;gt;, &amp;lt;c&amp;gt;else&amp;lt;/c&amp;gt;, and &amp;lt;c&amp;gt;end if&amp;lt;/c&amp;gt; statements must each be&lt;br /&gt;
on its own line. However, there is also a &amp;quot;short form&amp;quot; &amp;lt;c&amp;gt;if&amp;lt;/c&amp;gt; statement that allows you to write&lt;br /&gt;
an &amp;lt;c&amp;gt;if&amp;lt;/c&amp;gt; or &amp;lt;c&amp;gt;if/else&amp;lt;/c&amp;gt; on a single line, provided you have only a single statement for the then&lt;br /&gt;
block, and a single statement for the &amp;lt;c&amp;gt;else&amp;lt;/c&amp;gt; block (if you have an &amp;lt;c&amp;gt;else&amp;lt;/c&amp;gt; block at all). A shortform&lt;br /&gt;
if looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;if x == null then x = 1&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
…while a short-form if/else looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;if x &amp;gt;= 0 then print &amp;quot;positive&amp;quot; else print &amp;quot;negative&amp;quot;&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;c&amp;gt;end if&amp;lt;/c&amp;gt; is not used with a short-form &amp;lt;c&amp;gt;if&amp;lt;/c&amp;gt; or &amp;lt;c&amp;gt;if/else&amp;lt;/c&amp;gt;. Moreover, there is no&lt;br /&gt;
way to put more than one statement into the &amp;lt;c&amp;gt;then&amp;lt;/c&amp;gt; or &amp;lt;c&amp;gt;else&amp;lt;/c&amp;gt; block. If you need more than&lt;br /&gt;
one statement, then use the standard multi-line form.&lt;br /&gt;
&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
[[Category:Keywords]]&lt;/div&gt;</summary>
		<author><name>Turtlezero</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Import&amp;diff=1354</id>
		<title>Import</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Import&amp;diff=1354"/>
		<updated>2025-02-17T15:32:37Z</updated>

		<summary type="html">&lt;p&gt;Turtlezero: Fixed Further Reading placement&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt; is a function in [[Mini Micro]], [[Farmtronics]], [[command-line MiniScript]], and [[Soda]] that loads a MiniScript file from the current&lt;br /&gt;
directory, '''/sys/lib''', '''/usr/lib''', or some path defined in&lt;br /&gt;
[[env]].importPaths.  &amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt; looks for a file with the module name plus &amp;quot;.ms&amp;quot;.&lt;br /&gt;
Any values defined by that code then become available in a map of the same name.  &lt;br /&gt;
&lt;br /&gt;
== Usage Notes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt; imports the named module into the current local variable space.  Simple (and typical) usage is to do this at the top of your main program, where [[locals]] and [[globals]] are the same thing, which makes the imported module globally available.&lt;br /&gt;
&lt;br /&gt;
However, if you have a large, complex project composed of many interdependent modules, '''and''' you want those various modules to be testable on their own, then those modules are likely to be importing other modules, in what can rapidly become a tangle of imports that leads to several problems:&lt;br /&gt;
&lt;br /&gt;
# A recursive cycle of imports (e.g. A imports B which imports A) can result in an infinite loop.&lt;br /&gt;
# Importing a large module several times wastes time and makes your program take longer to load than necessary.&lt;br /&gt;
# If the module has any internal state, then you now have multiple separate copies of that internal state, which can lead to hard-to-find bugs.&lt;br /&gt;
&lt;br /&gt;
The solution to all these problems is to make a function like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;// ensureImport: check whether the given module has been imported already&lt;br /&gt;
// (or is in the process of being imported).  If so, return immediately.&lt;br /&gt;
// If not, then import that module into the global namespace.&lt;br /&gt;
globals.ensureImport = function(moduleName)&lt;br /&gt;
	if globals.hasIndex(moduleName) then return&lt;br /&gt;
	globals[moduleName] = &amp;quot;PENDING&amp;quot;	// (module is being imported now)&lt;br /&gt;
	import moduleName&lt;br /&gt;
	globals[moduleName] = locals[moduleName]&lt;br /&gt;
end function&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in some tiny, stand-alone script that can be safely imported from anywhere.  Import this with &amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt;, but then load all other modules with the &amp;lt;c&amp;gt;ensureImport&amp;lt;/c&amp;gt; function it provides.  For example, if the above function is in a script called &amp;quot;coreUtils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;import &amp;quot;coreUtils&amp;quot;&lt;br /&gt;
ensureImport &amp;quot;someModule&amp;quot;&lt;br /&gt;
ensureImport &amp;quot;someOtherOne&amp;quot;&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will ensure that no matter how your various files depend on each other, each one is only loaded once.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This &amp;lt;c&amp;gt;ensureImport&amp;lt;/c&amp;gt; function is available in the /sys/lib/importUtil standard library in Mini Micro.&lt;br /&gt;
&lt;br /&gt;
== Alternate Return Value ==&lt;br /&gt;
&lt;br /&gt;
Normally, all the file-scope variables (what would be &amp;lt;c&amp;gt;[[globals]]&amp;lt;/c&amp;gt; if the module were loaded and run by itself) are gathered into the map referenced by the name of the module itself.  However, it is possible to change this by executing a &amp;lt;c&amp;gt;[[return]]&amp;lt;/c&amp;gt; statement inside the module.  In this case, the name of the module will refer to whatever value you return.  See [https://luminaryapps.com/blog/advanced-import/index.html this blog post] for more detail.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The following example loads a script called &amp;quot;mathUtil.ms&amp;quot; (normally found in '''/sys/lib'''), and makes it available as a map called &amp;lt;c&amp;gt;mathUtil&amp;lt;/c&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;import &amp;quot;mathUtil&amp;quot;&lt;br /&gt;
print mathUtil.radToDeg(2*pi)  // prints 360&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some modules, like [[listUtil]], [[stringUtil]], and [[mapUtil]], extend these&lt;br /&gt;
built-in types with new methods.  For example, the built-in [[list]]&lt;br /&gt;
type does not have a .reverse method, but it does once you import&lt;br /&gt;
&amp;quot;listUtil&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;import &amp;quot;listUtil&amp;quot;&lt;br /&gt;
print [1,2,3].reverse  // prints [3, 2, 1]&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://luminaryapps.com/blog/advanced-import/index.html Advanced Tricks with Import] (blog post)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Module name !! Contents &lt;br /&gt;
|-&lt;br /&gt;
| [[bmfFonts]] || BMF (bitmapped font) utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[json]] || JSON utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[qa]] || Quality assurance (unit testing) utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[listUtil]] || List utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[mapUtil]] || Map (aka dictionary, hash table) utilities&lt;br /&gt;
|-&lt;br /&gt;
| [[mathUtil]] || Math utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[stringUtil]] || String utilities&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
[[Category:Mini Micro]]&lt;br /&gt;
[[Category:Farmtronics]]&lt;/div&gt;</summary>
		<author><name>Turtlezero</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Import&amp;diff=1353</id>
		<title>Import</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Import&amp;diff=1353"/>
		<updated>2025-02-17T15:28:24Z</updated>

		<summary type="html">&lt;p&gt;Turtlezero: /* Examples */  Added See Also section linking to the modules mentioned in the text, inclding MathUtil (orphaned) and qa (missing)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt; is a function in [[Mini Micro]], [[Farmtronics]], [[command-line MiniScript]], and [[Soda]] that loads a MiniScript file from the current&lt;br /&gt;
directory, '''/sys/lib''', '''/usr/lib''', or some path defined in&lt;br /&gt;
[[env]].importPaths.  &amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt; looks for a file with the module name plus &amp;quot;.ms&amp;quot;.&lt;br /&gt;
Any values defined by that code then become available in a map of the same name.  &lt;br /&gt;
&lt;br /&gt;
== Usage Notes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt; imports the named module into the current local variable space.  Simple (and typical) usage is to do this at the top of your main program, where [[locals]] and [[globals]] are the same thing, which makes the imported module globally available.&lt;br /&gt;
&lt;br /&gt;
However, if you have a large, complex project composed of many interdependent modules, '''and''' you want those various modules to be testable on their own, then those modules are likely to be importing other modules, in what can rapidly become a tangle of imports that leads to several problems:&lt;br /&gt;
&lt;br /&gt;
# A recursive cycle of imports (e.g. A imports B which imports A) can result in an infinite loop.&lt;br /&gt;
# Importing a large module several times wastes time and makes your program take longer to load than necessary.&lt;br /&gt;
# If the module has any internal state, then you now have multiple separate copies of that internal state, which can lead to hard-to-find bugs.&lt;br /&gt;
&lt;br /&gt;
The solution to all these problems is to make a function like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;// ensureImport: check whether the given module has been imported already&lt;br /&gt;
// (or is in the process of being imported).  If so, return immediately.&lt;br /&gt;
// If not, then import that module into the global namespace.&lt;br /&gt;
globals.ensureImport = function(moduleName)&lt;br /&gt;
	if globals.hasIndex(moduleName) then return&lt;br /&gt;
	globals[moduleName] = &amp;quot;PENDING&amp;quot;	// (module is being imported now)&lt;br /&gt;
	import moduleName&lt;br /&gt;
	globals[moduleName] = locals[moduleName]&lt;br /&gt;
end function&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in some tiny, stand-alone script that can be safely imported from anywhere.  Import this with &amp;lt;c&amp;gt;import&amp;lt;/c&amp;gt;, but then load all other modules with the &amp;lt;c&amp;gt;ensureImport&amp;lt;/c&amp;gt; function it provides.  For example, if the above function is in a script called &amp;quot;coreUtils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;import &amp;quot;coreUtils&amp;quot;&lt;br /&gt;
ensureImport &amp;quot;someModule&amp;quot;&lt;br /&gt;
ensureImport &amp;quot;someOtherOne&amp;quot;&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will ensure that no matter how your various files depend on each other, each one is only loaded once.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This &amp;lt;c&amp;gt;ensureImport&amp;lt;/c&amp;gt; function is available in the /sys/lib/importUtil standard library in Mini Micro.&lt;br /&gt;
&lt;br /&gt;
== Alternate Return Value ==&lt;br /&gt;
&lt;br /&gt;
Normally, all the file-scope variables (what would be &amp;lt;c&amp;gt;[[globals]]&amp;lt;/c&amp;gt; if the module were loaded and run by itself) are gathered into the map referenced by the name of the module itself.  However, it is possible to change this by executing a &amp;lt;c&amp;gt;[[return]]&amp;lt;/c&amp;gt; statement inside the module.  In this case, the name of the module will refer to whatever value you return.  See [https://luminaryapps.com/blog/advanced-import/index.html this blog post] for more detail.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The following example loads a script called &amp;quot;mathUtil.ms&amp;quot; (normally found in '''/sys/lib'''), and makes it available as a map called &amp;lt;c&amp;gt;mathUtil&amp;lt;/c&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;import &amp;quot;mathUtil&amp;quot;&lt;br /&gt;
print mathUtil.radToDeg(2*pi)  // prints 360&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some modules, like [[listUtil]], [[stringUtil]], and [[mapUtil]], extend these&lt;br /&gt;
built-in types with new methods.  For example, the built-in [[list]]&lt;br /&gt;
type does not have a .reverse method, but it does once you import&lt;br /&gt;
&amp;quot;listUtil&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;import &amp;quot;listUtil&amp;quot;&lt;br /&gt;
print [1,2,3].reverse  // prints [3, 2, 1]&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Module name !! Contents &lt;br /&gt;
|-&lt;br /&gt;
| [[bmfFonts]] || BMF (bitmapped font) utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[json]] || JSON utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[qa]] || Quality assurance (unit testing) utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[listUtil]] || List utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[mapUtil || Map (aka dictionary, hash table) utilities&lt;br /&gt;
|-&lt;br /&gt;
| [[mathUtil || Math utilities &lt;br /&gt;
|-&lt;br /&gt;
| [[stringUtil]] || String utilities&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
[[Category:Mini Micro]]&lt;br /&gt;
[[Category:Farmtronics]]&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
* [https://luminaryapps.com/blog/advanced-import/index.html Advanced Tricks with Import] (blog post)&lt;/div&gt;</summary>
		<author><name>Turtlezero</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Sprite&amp;diff=1352</id>
		<title>Sprite</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Sprite&amp;diff=1352"/>
		<updated>2025-02-17T14:44:13Z</updated>

		<summary type="html">&lt;p&gt;Turtlezero: /* See also */  Added a link to orphaned &amp;quot;sprite sheet&amp;quot; page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;Sprite&amp;lt;/c&amp;gt; is a built-in class in the [[Mini Micro]] API.  It represents an image which can be added to a [[SpriteDisplay]], enabling it to be drawn to the screen very efficiently while also being scaled, rotated, or tinted, and layered consistently with other sprites and the surrounding displays.&lt;br /&gt;
&lt;br /&gt;
== Methods and properties used with Sprite objects ==&lt;br /&gt;
&lt;br /&gt;
Use these methods on Sprite instances, created with &amp;lt;c&amp;gt;[[new]] Sprite&amp;lt;/c&amp;gt;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method or Property !! Purpose !! Type&lt;br /&gt;
|-&lt;br /&gt;
| colspan=3 style=&amp;quot;text-align: center;&amp;quot; | '''Edit and read'''&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.image]] || image displayed  by the sprite || [[Image]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.x]] || horizontal position of the sprite || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.y]] || vertical position of the sprite || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.scale]] || sprite scale (default 1.0) || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.rotation]] || sprite rotation (degrees counter-clockwise) || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.tint]] || tint color (defaults to white) || string (color)&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.localBounds]] || stores the local bounds of the sprite || [[Bounds]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=3 style=&amp;quot;text-align: center;&amp;quot; | '''Read only'''&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.worldBounds]] || computes world bounds from local bounds and current position || pare of numbers&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.contains]](''x'', ''y'') || return whether the sprite contains the given world point || bool&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.overlaps]](''other'') || return whether this sprite is touching another sprite or [[Bounds]] || bool&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.corners]] || return &amp;lt;c&amp;gt;[x,y]&amp;lt;/c&amp;gt; screen positions of the four corners of this sprite, counter-clockwise from bottom left || 4 pares of numbers&lt;br /&gt;
|-&lt;br /&gt;
| colspan=3  style=&amp;quot;text-align: center;&amp;quot;| '''Run'''&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.setCorners]] ''corners''|| set new screen positions for the four sprite corners (counter-clockwise from bottom left)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage Notes (Soda) ==&lt;br /&gt;
&lt;br /&gt;
In [[Soda]] there is currently only one, implicit, [[Display]].  So to add sprites to this display, push them onto a global list called &amp;lt;c&amp;gt;sprites&amp;lt;/c&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Soda]] does not currently support [[Sprite.corners]] or [[Sprite.setCorners]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
This example creates a sprite, loads it into display 4 (which by default is a [[SpriteDisplay]]), and rotates it through 360 degrees.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;spr = new Sprite&lt;br /&gt;
spr.image = file.loadImage(&amp;quot;/sys/pics/Wumpus.png&amp;quot;)&lt;br /&gt;
display(4).sprites.push spr&lt;br /&gt;
spr.x = 480&lt;br /&gt;
spr.y = 320&lt;br /&gt;
for r in range(0,360)&lt;br /&gt;
   spr.rotation = r&lt;br /&gt;
   yield&lt;br /&gt;
end for&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[How to move a sprite forward]]&lt;br /&gt;
* [[How to detect a click on a sprite]]&lt;br /&gt;
* [[How to move a sprite with directional inputs]]&lt;br /&gt;
* [[How to load a sprite from the web]]&lt;br /&gt;
* [[How to make a sprite translucent]]&lt;br /&gt;
* [[How to move a sprite towards a target]]&lt;br /&gt;
* [[How to point a sprite at a target]]&lt;br /&gt;
* [[How to use a sprite sheet]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Mini Micro]]&lt;br /&gt;
[[Category: Soda]]&lt;/div&gt;</summary>
		<author><name>Turtlezero</name></author>
		
	</entry>
</feed>