Difference between revisions of "Empty Condition"

From AgentCubes
Jump to navigation Jump to search
imported>Mike
imported>Repenning
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:Empty.png|150px]]
+
[[Image:Empty.png|150px|Empty.png]]  
  
[[image:Empty expanded1.png|150px]]
+
[[Image:Empty expanded1.png|150px|Empty expanded1.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
{| cellpadding="10" cellspacing="0" border="0" width="100%"
<tr>
+
|-
<td align="left" valign="top" width="80"><b>Definition:</b></td>
+
| align="left" valign="top" width="80" | '''Definition:'''
<td align="left" valign="top" width="100%">The <strong>Empty</strong> condition checks if the neighboring cell specified by the [[Direction parameter]] is empty. A cell is empty if it does not contain any agents found in the current Gallery. If the cell indicated by the Direction parameter is empty, the condition is true. Otherwise, the condition is false. </td>
+
| align="left" valign="top" width="100%" | Check in a certain direction to see if that cell exists and is empty. Typically this is used to make sure you can move into a cell. All the cells beyond the edge of the world are considered NOT empty. That is you could NOT move there.
</tr>
+
|-
<tr>
+
| align="left" valign="top" width="80" | '''Parameters:'''
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
+
| align="left" valign="top" width="100%" | [[Direction parameter|direction]]'' the direction in which you check if there is an empty cell'' <br>[[VAT Formula parameter|layer]] ''relative layer reference: 0 = same layer, &gt; 0 layers above, &lt; 0 layers below''
<td align="left" valign="top" width="100%">[[Direction parameter|direction]]</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%">???Avalanche example???
 
[[Image:Empty condition example.png|500px]]</td>
 
</tr>
 
  
</table>
+
|-
 +
| align="left" valign="top" width="80" | '''Example:'''
 +
| align="left" valign="top" width="100%" | move right if you can: IF empty(right) THEN move(right)
 +
|}
  
 
[[Category:AgentCubes_Conditions]]
 
[[Category:AgentCubes_Conditions]]

Latest revision as of 00:54, 20 April 2012

Empty.png

Empty expanded1.png

Definition: Check in a certain direction to see if that cell exists and is empty. Typically this is used to make sure you can move into a cell. All the cells beyond the edge of the world are considered NOT empty. That is you could NOT move there.
Parameters: direction the direction in which you check if there is an empty cell
layer relative layer reference: 0 = same layer, > 0 layers above, < 0 layers below
Example: move right if you can: IF empty(right) THEN move(right)