Changeset 107:672cc5598e77


Ignore:
Timestamp:
Sep 2, 2009, 6:26:15 PM (11 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@108
Message:

Fix dist metric

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gamelib/misc.py

    r100 r107  
    1414        """Gives the distance to another position"""
    1515
    16         return abs(self.x - b.x) + abs(self.y - b.y)
     16        return max(abs(self.x - b.x), abs(self.y - b.y))
    1717
    1818    def __sub__(self, b):
Note: See TracChangeset for help on using the changeset viewer.