We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const
let
arrow-parens
setInterval(func, fps);
SetInit
turn
collision
TurnToCollision
function run() { if (!player.run) return; const { side, x, y, speed, width, height } = player; const rect = gamezone.getBoundingClientRect(); if (side === 'top' && y > 0) player.y -= speed; else if (side === 'right' && x < rect.width - width) player.x += speed; else if (side === 'bottom' && y < rect.height - height) player.y += speed; else if (side === 'left' && x > 0) player.x -= speed; player.el.style.top = `${y}px`; player.el.style.left = `${x}px`; }
const sign = (direction === 'top' || direction === 'left') ? 1 : -1; moveBull(tank, direction, bullet, sign);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
const
instead oflet
here https://github.com/Dimdim28/Webgames/blob/62a35dbdfc7b5fa68173ea7f68f36baabc20ebfb/tanks.js#L20arrow-parens
rule: https://github.com/Dimdim28/Webgames/blob/62a35dbdfc7b5fa68173ea7f68f36baabc20ebfb/tanks.js#L160setInterval(func, fps);
and changeSetInit
to lowerCamepCaseturn
andcollision
from that place where you callTurnToCollision
https://github.com/Dimdim28/Webgames/blob/62a35dbdfc7b5fa68173ea7f68f36baabc20ebfb/tanks.js#L183-L190The text was updated successfully, but these errors were encountered: