reedlaw / ruby-mmo

Ruby MMO: massively multiplayer online programming challenge
274 stars 102 forks source link

Found a culprit that triggered endless loop. #53

Closed pjurczynski closed 12 years ago

pjurczynski commented 12 years ago

the move command issued in two different players. I've deleted my code responsible for this - the other is in davidk.rb [davidk01]

ghost commented 12 years ago

I wondering if there might be a way to evaluate move in a context that doesn't lead to an infinite loop via some magic with instance_eval

ghost commented 12 years ago

Another idea is to use caller and treat engine requests different from player requests or see if you have called move more than once and exit early.

ghost commented 12 years ago

I have modified my code to mitigate infinite move calls and opened a pull request.