diff --git a/apps/tetris/tetris.app.js b/apps/tetris/tetris.app.js index a84873e36..255437b62 100644 --- a/apps/tetris/tetris.app.js +++ b/apps/tetris/tetris.app.js @@ -95,6 +95,11 @@ function redrawPF(ly) { } } +function gameOver() { + g.setColor(1, 1, 1).setFontAlign(0, 1, 0).setFont("Vector",22) + .drawString("Game Over", 176/2, 76); +} + function insertAndCheck() { for (y=0; y { - rotate(); +Bangle.on("drag", (e) => { + let h = 176/2; + if (!e.b) + return; + if (e.y < h) { + if (e.x < h) + rotate(); + else + move(0, 1); + } else { + if (e.x < h) + move(-1, 0); + else + move(1, 0); + } }); Bangle.on("swipe", (x,y) => {