Table of Contents

Class: Direction cage.py

A generalized direction on a 2-dimensional topology. For use with agents which navigate their way around a topology without respect to neighborhoods.

Methods   
__init__
advance
offset
turn
turnLeft
turnRight
  __init__ 
__init__ ( self,  facing=0 )

  advance 
advance ( self,  location )

Given a location, use the direction to determine where the new location would be after advancing and return that.

  offset 
offset ( self )

Return the offset for the current facing.

  turn 
turn ( self,  increment )

Changing the facing by an integer (positive or negative).

  turnLeft 
turnLeft ( self )

  turnRight 
turnRight ( self )


Table of Contents

This document was automatically generated on Sat Jul 29 13:31:37 2006 by HappyDoc version 2.1