I think you're right. The problem I was having was a disconnect between the direction and the dx, dy. The better solution is, IMO,
def get_direction(self):
return self._direction
def set_direction(self, value):
self._direction = value
dx,dy = {UP: (0,-1),
LEFT: (-1,0),
DOWN: (0,1),
RIGHT:(1,0)} [self._direction]
direction = property(get_direction, set_direction)
Jeff
Last edited by jrcagle; Feb 14th, 2007 at 12:00 am.
Reputation Points: 92
Solved Threads: 156
Practically a Master Poster
Offline 608 posts
since Jul 2006