OrdonTeam / Hackathon3v2

Kanban: https://waffle.io/OrdonTeam/Hackathon3v2
MIT License
0 stars 0 forks source link

refactor moveAll #18

Open ghostbuster91 opened 9 years ago

OrdonTeam commented 9 years ago

I wonder if this method should be in MultipleGameObjects class.. Also according to https://github.com/OrdonTeam/Hackathon3v2/issues/25 we can change signature to return only moves instead of new MultipleGameObjects. It will help us revert those move which trigger collision 1-3.

ghostbuster91 commented 9 years ago

Apart from the question if this is a right place for this method, I dont think that we have to change this signature. Please notice that moveAll invokes moveSingleObject in which we can simply revert the move if a collision was detected. Look at 2e6b6d6cef8c3b8cd8a65c504c5b0d792a5b3bce