noam-c/EDEn — pull request #18 by linwang (2012-03-18 22:36:17+00:00)
Title: Fix bug where characters did not move on fast machines

Characters did not move on fast machines because if timePassed is less
than 5 milliseconds, character's distance to move will be 0.xxx, and since
a character can only move whole number distances and the variable tracking
the distance (distanceTraversed) is of type int, the distance is always 0. The
fix is to add a member variable (cumulativeDistanceCovered) to collect
these small distances, and move the character forward by the floor of
cumulativeDistanceCovered when it is greater than 1.0. The distance that
the character moved will then be subtracted from cumulativeDistanceCovered.