From 8116d3bfd1de92e740a2b07f17bca8f25df4488d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Aug 2026 12:42:59 +0000 Subject: [PATCH 1/2] Initial plan From 52cf6516044057245be9aedc23c99263771b7a99 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Aug 2026 12:44:19 +0000 Subject: [PATCH 2/2] Fix mobile swipe triggering jump Co-authored-by: jankln <77668140+jankln@users.noreply.github.com> --- app.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 849e4ff..8af4f30 100644 --- a/app.js +++ b/app.js @@ -459,6 +459,9 @@ function handleKeyUp(event) { } function handlePointerDown(event) { + if (event.pointerType === "touch") { + return; + } pointerStart = { y: event.clientY, time: performance.now() }; if (!state.started || state.running) { jump(); @@ -466,6 +469,9 @@ function handlePointerDown(event) { } function handlePointerMove(event) { + if (event.pointerType === "touch") { + return; + } if (!pointerStart || !state.running) { return; } @@ -476,6 +482,9 @@ function handlePointerMove(event) { } function handlePointerUp(event) { + if (event.pointerType === "touch") { + return; + } if (!pointerStart) { return; } @@ -495,9 +504,6 @@ function handleTouchStart(event) { } const touch = event.touches[0]; touchStart = { y: touch.clientY, time: performance.now() }; - if (!state.started || state.running) { - jump(); - } event.preventDefault(); } @@ -522,8 +528,11 @@ function handleTouchEnd(event) { if (state.gameOver && deltaY <= 40) { resetGame(); startGame(); + } else if (deltaY <= 40 && (!state.started || state.running)) { + jump(); + } else { + releaseJump(); } - releaseJump(); duck(false); touchStart = null; event.preventDefault();