Made constants.js compatible with node js
Made the "updateDirection" event rewind a player by its ping and added tests for it