Update getOppositeDirection.js