NintenJoe/zol — pull request #16 by Mortech (2014-03-28 03:06:46+00:00)
Title: Task 1.1

So, I ended up changing / fixing a LOT of stuff over the course of this task.

- Now using a custom Graph class (Graph.py) instead of the networkx directed graph. This comes with its own host of problems, namely that right now edges area dictionary where the event that triggers the transition is a key and the node to travel to is the value, however events are being hashed based on repr() and not an actual hash function. This works for most transitions only because there is a single or no parameters, but won't work for collisions. Actually, I wasn't sure how collisions were going to work at all, but it should be easy enough to either implement the hash function in Event or modify repr to properly handle collisions. There is also the problem of timeouts only working if the exact value for that timeout is reached, and it is ignored afterwards.

- Updated MoveState because I realized that it was changing the width and height of the bounding volume, not its coordinates. Also, the velocity of the physical state wasn't being updated.

- Changed StateMachine to add timeout transitions in the automated step, and use Graph.py instead of networkx. The timeout transitions are a little bit weird, but I assumed that we wouldn't add NOTIFY events on every turn we call update. If we are planning on having NOTIFY events before every update, we could revert the automated step code back to the way it was before.

- Found a pretty critical bug in PhysicalState that basically meant the default physical state did not always start out the same. It's fixed now.