Open joanrig opened 5 years ago
in the code snippet, i had to comment out the e.stopPropagation(); and e.preventDefault(); to get game to work in browser.
with those lines, the dodger can't move left or right -- ie the default action of left and right arrow key is prevented?
`function moveDodger(e) { if (e.which === LEFT_ARROW) { moveDodgerLeft(); //e.stopPropagation(); //e.preventDefault(); }
if (e.which == RIGHT_ARROW) { moveDodgerRight(); //e.stopPropagation(); //e.preventDefault(); } }`