Added var keyword to onMove and onDie functions

Was throwing error when running from source in IE11 because onMove was "not defined" because the class is using strict mode.