diff --git a/src/pages/Game.tsx b/src/pages/Game.tsx index ae69a35..6199ac6 100644 --- a/src/pages/Game.tsx +++ b/src/pages/Game.tsx @@ -239,7 +239,15 @@ export default function Game() { const touchDownHandler = (event: TouchEvent) => { if (!inGame()) return; event.preventDefault(); - handleMove(event.touches[0]?.clientX || -1, event.touches[0]?.clientY || -1); + // to be honest i have no idea how this is implemented on browsers :) + if (event.touches[0] == undefined) { + handleMove(-1, -1); + } else { + for (const touch of event.touches) { + handleMove(touch.clientX, touch.clientY); + } + } + handleMouseDown(); }; boardElement.addEventListener('touchstart', touchDownHandler);