Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE test passes || game works in browser #31

Open
joanrig opened this issue Jan 20, 2019 · 2 comments
Open

IDE test passes || game works in browser #31

joanrig opened this issue Jan 20, 2019 · 2 comments

Comments

@joanrig
Copy link

joanrig commented Jan 20, 2019

No description provided.

@joanrig
Copy link
Author

joanrig commented Jan 20, 2019

`function moveDodger(e) {
if (e.which === LEFT_ARROW) {
moveDodgerLeft();
//e.stopPropagation();
//e.preventDefault();
}

if (e.which == RIGHT_ARROW) {
moveDodgerRight();
//e.stopPropagation();
//e.preventDefault();
}
}`

@joanrig
Copy link
Author

joanrig commented Jan 20, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant