Difference between revisions of "See Condition"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Andri
Line 1: Line 1:
[[image:See-condition.png|150px]]
+
[[image:See-condition.png|150px]] [[image:See-condition-additional-params.png|150px]]
 
<table cellpadding="10" cellspacing="0" border="0" width="100%">
 
<table cellpadding="10" cellspacing="0" border="0" width="100%">
 
<tr>
 
<tr>

Revision as of 16:03, 17 June 2011

See-condition.png See-condition-additional-params.png

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 (.) in the direction parameter refers to the agent itself, so the agent can check its own shape. If the cell in the indicated contains the chosen shape, the See condition is true. Otherwise, the condition is false.
Parameters: direction, shape
Optional Parameters: Layer parameter: the See condition can check to see if the specified shape exists in a layer other than the current layer the agent resides on.
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.