From ade2df3f0fc6990a76727fc3e750f3daadd1c5a0 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sun, 8 Oct 2023 12:05:30 +0200 Subject: [PATCH] Implement move down with one click. --- apps/tetris/tetris.app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/tetris/tetris.app.js b/apps/tetris/tetris.app.js index 255437b62..77c40de9a 100644 --- a/apps/tetris/tetris.app.js +++ b/apps/tetris/tetris.app.js @@ -177,8 +177,13 @@ Bangle.on("drag", (e) => { if (e.y < h) { if (e.x < h) rotate(); - else - move(0, 1); + else { + let i = 0; + for (i=0; i<10; i++) { + move(0, 1); + g.flip(); + } + } } else { if (e.x < h) move(-1, 0);