traxaber / cs435-p2

0 stars 0 forks source link

Comment 6 #16

Open ak2253 opened 4 years ago

ak2253 commented 4 years ago

Its deleting a second from first while adding a first in second when it should be deleting from both. https://github.com/angdav/cs435-p2/blob/7773ebbbc02f04d5968b58217efb4db4635591ad/p6.py#L26-L30 so something like: if (abs(first.x - second.x) == 1) != (abs(first.y - second.y) == 1): if second in first.neighbors and first in second.neighbors: first.neighbors.remove(second) second.neighbors.remove(first) should work.

traxaber commented 4 years ago

Addressed in: https://github.com/angdav/cs435-p2/commit/0f8931c20ae409797a1921173f8cf032231e54cc