Difference between revisions of "See Condition"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
m (moved See condition to See-Condition: to make compatible with AgentCubes)
imported>Andri
Line 11: Line 11:
 
<tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Optional Parameters:</b></td>
 
<td align="left" valign="top" width="80"><b>Optional Parameters:</b></td>
<td align="left" valign="top" width="100%"><a href="tm_ti_direction.html" target="body"><strong>direction</strong></a>, <a href="tm_ti_depiction.html" target="body"><strong>depiction</strong></a><strong> </strong></td>
+
<td align="left" valign="top" width="100%">layer </td>
 
<td></td>
 
<td></td>
 
</tr>
 
</tr>
Line 17: Line 17:
 
<tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
<td align="left" valign="top" width="100%">The Shark agent in the <a title="The applet link will only work if you are accessing the documentation from the AgentSheets web pages." href="http://www.agentsheets.com/Applets/fish-tank/index.html" target="Demo Window"><strong>Fish Tank</strong></a> simulation looks above it to see if there is a Fish agent to eat, and also checks to see if the Shark itself looks like a Shark going left and decides to change directions or move to the left.
+
<td align="left" valign="top" width="100%">The Shark agent in the Fish Tank simulation looks above it to see if there is a Fish agent to eat, and also checks to see if the Shark itself looks like a Shark going left and decides to change directions or move to the left.
  
 
<center>
 
<center>
<p><img align="bottom" border="0" src="images/condition_see_example.gif">
+
 
</center>
 
</center>
 
</td>
 
</td>

Revision as of 21:36, 18 May 2011

Definition: The See condition checks if the agent at the cell indicated by the Direction parameter looks like the shape specified in the Shape parameter. The dot (.) refers to the agent itself.
If the indicated cell contains the chosen depiction, the condition is true. Otherwise, the condition is false.
Parameters: direction, shape
Optional Parameters: layer
Example: The Shark agent in the Fish Tank simulation looks above it to see if there is a Fish agent to eat, and also checks to see if the Shark itself looks like a Shark going left and decides to change directions or move to the left.