A raw location on the board, represented as a file (x) and a rank (y)
value, both indexing from zero.
Methods




__add__

__add__ ( self, other )
Vector sum.


__cmp__

__cmp__ ( self, other )
Not very meaningful for inequalities.


__getitem__

__getitem__ ( self, key )
Index as a sequence.


__init__

__init__ (
self,
x,
y,
)


__repr__

__repr__ ( self )


__sub__

__sub__ ( self, other )
Vector difference.


match

match ( self, pattern )
Match SELF against a PATTERN, where PATTERN is a Loc in which
wildcards are represented with a None.


normalize

normalize ( self )
Maintain directions but make components size no more than 1.


traverse

traverse (
self,
other,
delta,
)
Return a path from SELF to OTHER (not including SELF, but including
OTHER if appropriate), counting by increments of DELTA. Return None
if no such path is possible.


tuple

tuple ( self )
Return the location as a tuple.

