[Tutor] Need help in making this code more pythonic
ceasar102 at yahoo.com
Sun Jul 26 13:23:19 CEST 2009
I need some suggestions on how to make this code pythonic. The program basically runs a simulation of an object that moves on a 2D plane. The object keeps on moving from its current coordinate to randomly picked adjacent coordinates with the object is not allowed to move move to a previously covered coordinate point as the rule. If the object is unable to move the program will terminate. Some of the concerns I have in mind is the code in the move method in Person class. I am sure there are some built-in methods or features in python that I could use to improve the implementation of that method. Hope you guys can enlighten me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor