Empty Condition
Revision as of 00:52, 20 April 2012 by imported>Repenning
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: |
directionthe direction in which you check if there is an empty cell |
Example: | move right if you can: IF empty(right) THEN move(right) |