Difference between revisions of "Stacked-a Condition"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Corrina
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[image:Stacked a condition.png|150px]]
+
[[Image:Stacked a.png|200px|Stacked a.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>Stacked-a</strong> condition checks if the agent's location in relation to the agent specified by the [[Agent Class Name parameter|agent class]] matches the adjacency choice; that is, the condition checks whether the agent is ''immediately above'', ''somewhere above'', ''immediately below'', ''somewhere below'', or ''above or below'' the agent that is specified by the class. If the agent is adjacent to the chosen class as specified with the adjacency parameter, the condition is true. Otherwise, the condition is false.<BR>
+
| align="left" valign="top" width="100%" | The '''Stacked-a''' condition: ''checks if the agent's location in relation to the agent specified by the ''[[Agent Class Name parameter|''agent class'']]''matches the adjacency choice.&nbsp;''<br>  
The difference between the [[Stacked Condition|Stacked]] and the Stacked-A conditions is that the Stacked condition checks for a specific shape/look and is true only if the agent has that exact depiction, whereas Stacked-A checks for any depiction of the given agent and is true regardless of how the agent looks.
+
====== ''The difference between the ''[[Stacked Condition|''Stacked'']]''and the Stacked-A conditions is that the Stacked condition checks for a specific shape/look and is true only if the agent has that exact depiction, whereas Stacked-A checks for any depiction of the given agent and is true regardless of how the agent looks.'' ======
  </td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
 
<td align="left" valign="top" width="100%">[[Adjacency parameter|adjacency]], [[Shape parameter|shape]] </td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%"> The Frog agent in the Frogger game checks to see if it is stacked immediately on above a tunnel, no matter what the tunnel looks like, in which case it gives a message that walking over the tunnel to cross the road is not permitted (it's cheating!), erases the Frog, and stops the simulation. The same happens when the user tries to navigate the Frog on top of a Log Maker.
 
  
[[Image:Stacked a condition example.png|500px]]</td>
+
|-
</tr>
+
| align="left" valign="top" width="80" | '''Parameters:'''
 +
| align="left" valign="top" width="100%" |
 +
[[Adjacency parameter|adjacency]]: ''where to look for the target agent''
  
</table>
+
[[Shape parameter|shape]]:&nbsp;''what sort of target agent to look for''
 +
 
 +
|-
 +
| align="left" valign="top" width="80" | '''Example:'''
 +
| align="left" valign="top" width="100%" | <br>
 +
|}
  
 
[[Category:AgentCubes_Conditions]]
 
[[Category:AgentCubes_Conditions]]

Latest revision as of 01:09, 21 April 2012

Stacked a.png

Definition: The Stacked-a condition: checks if the agent's location in relation to the agent specified by the agent classmatches the adjacency choice. 
The difference between the Stackedand the Stacked-A conditions is that the Stacked condition checks for a specific shape/look and is true only if the agent has that exact depiction, whereas Stacked-A checks for any depiction of the given agent and is true regardless of how the agent looks.
Parameters:

adjacency: where to look for the target agent

shapewhat sort of target agent to look for

Example: