Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-Hopkinson committed Jun 5, 2024
1 parent 63e92cf commit 474a5ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
13 changes: 4 additions & 9 deletions src/panel/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export function petPanelApp(
if (canvas) {
canvas.style.display = 'block';
}
ballState = new BallState(100, 100, 4, 5);
ballState = new BallState();
}

function dynamicThrowOn() {
Expand All @@ -377,7 +377,7 @@ export function petPanelApp(
endMouseY = e.clientY;
startMouseX = e.clientX;
startMouseY = e.clientY;
ballState = new BallState(e.clientX, e.clientY, 0, 0);
ballState = new BallState();

allPets.pets.forEach((petEl) => {
if (petEl.pet.canChase) {
Expand All @@ -397,20 +397,15 @@ export function petPanelApp(
startMouseY = endMouseY;
endMouseX = ev.clientX;
endMouseY = ev.clientY;
ballState = new BallState(ev.clientX, ev.clientY, 0, 0);
ballState = new BallState();
drawBall();
};
window.onmouseup = (ev) => {
ev.preventDefault();
window.onmouseup = null;
window.onmousemove = null;

ballState = new BallState(
endMouseX,
endMouseY,
endMouseX - startMouseX,
endMouseY - startMouseY,
);
ballState = new BallState();
allPets.pets.forEach((petEl) => {
if (petEl.pet.canChase) {
petEl.pet.chase(ballState, canvas);
Expand Down
3 changes: 1 addition & 2 deletions src/panel/states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ export class BallState {
vy: number;
paused: boolean;

// eslint-disable-next-line no-unused-vars
constructor(cx: number, cy: number, vx: number, _vy: number) {
constructor() {
this.cx = Math.random() * 100;
this.cy = Math.random() * 100;
this.vx = Math.random() * 10;
Expand Down

0 comments on commit 474a5ca

Please sign in to comment.