Fixed player movement and collisions

A small misunderstanding about bitwise operator precedence in js ;)