{"id":10907,"date":"2000-02-05T01:34:14","date_gmt":"2000-02-04T23:34:14","guid":{"rendered":"https:\/\/i-dentist.ro\/falling-blocks-game\/"},"modified":"2026-04-02T13:19:39","modified_gmt":"2026-04-02T10:19:39","slug":"falling-blocks-game","status":"publish","type":"post","link":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/","title":{"rendered":"Falling Blocks Game"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"10907\" class=\"elementor elementor-10907 elementor-6968\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3169ceb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3169ceb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7f3d073\" data-id=\"7f3d073\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a85b71e elementor-widget elementor-widget-html\" data-id=\"a85b71e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <title>Falling Blocks Game<\/title>\r\n    <style>\r\n        body {\r\n            text-align: center;\r\n            background-color: #f4f4f4;\r\n            touch-action: manipulation;\r\n        }\r\n        canvas {\r\n            background: #222;\r\n            display: block;\r\n            margin: auto;\r\n        }\r\n        .controls {\r\n            display: flex;\r\n            justify-content: center;\r\n            margin-top: 10px;\r\n        }\r\n        .btn {\r\n            padding: 15px 30px;\r\n            margin: 5px;\r\n            font-size: 18px;\r\n            cursor: pointer;\r\n            border: none;\r\n            background-color: #007BFF;\r\n            color: white;\r\n            border-radius: 5px;\r\n        }\r\n    <\/style>\r\n<\/head>\r\n<body>\r\n    <h1><\/h1>\r\n    <canvas id=\"gameCanvas\" width=\"400\" height=\"500\"><\/canvas>\r\n    <div class=\"controls\">\r\n        <button class=\"btn\" id=\"leftBtn\">Stanga<\/button>\r\n        <button class=\"btn\" id=\"rightBtn\">Dreapta<\/button>\r\n    <\/div>\r\n    <script>\r\n        const canvas = document.getElementById(\"gameCanvas\");\r\n        const ctx = canvas.getContext(\"2d\");\r\n\r\n        const player = {\r\n            x: 175,\r\n            y: 450,\r\n            width: 50,\r\n            height: 50,\r\n            speed: 5,\r\n            color: \"blue\"\r\n        };\r\n\r\n        const blocks = [];\r\n        let score = 0;\r\n        let gameOver = false;\r\n\r\n        function createBlock() {\r\n            const size = 40;\r\n            blocks.push({ x: Math.random() * (canvas.width - size), y: 0, width: size, height: size, speed: 3 });\r\n        }\r\n\r\n        function update() {\r\n            if (gameOver) return;\r\n\r\n            blocks.forEach(block => {\r\n                block.y += block.speed;\r\n                if (block.y > canvas.height) {\r\n                    score++;\r\n                    blocks.splice(blocks.indexOf(block), 1);\r\n                }\r\n                if (\r\n                    player.x < block.x + block.width &&\r\n                    player.x + player.width > block.x &&\r\n                    player.y < block.y + block.height &&\r\n                    player.y + player.height > block.y\r\n                ) {\r\n                    gameOver = true;\r\n                    alert(\"Game Over! Your score: \" + score);\r\n                    document.location.reload();\r\n                }\r\n            });\r\n        }\r\n\r\n        function draw() {\r\n            ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n            ctx.fillStyle = player.color;\r\n            ctx.fillRect(player.x, player.y, player.width, player.height);\r\n            blocks.forEach(block => {\r\n                ctx.fillStyle = \"red\";\r\n                ctx.fillRect(block.x, block.y, block.width, block.height);\r\n            });\r\n            ctx.fillStyle = \"white\";\r\n            ctx.fillText(\"Score: \" + score, 10, 20);\r\n        }\r\n\r\n        function gameLoop() {\r\n            update();\r\n            draw();\r\n            requestAnimationFrame(gameLoop);\r\n        }\r\n\r\n        document.addEventListener(\"keydown\", (e) => {\r\n            if (e.key === \"ArrowLeft\" && player.x > 0) {\r\n                player.x -= player.speed;\r\n            } else if (e.key === \"ArrowRight\" && player.x + player.width < canvas.width) {\r\n                player.x += player.speed;\r\n            }\r\n        });\r\n\r\n        document.getElementById(\"leftBtn\").addEventListener(\"touchstart\", () => {\r\n            if (player.x > 0) player.x -= player.speed * 2;\r\n        });\r\n\r\n        document.getElementById(\"rightBtn\").addEventListener(\"touchstart\", () => {\r\n            if (player.x + player.width < canvas.width) player.x += player.speed * 2;\r\n        });\r\n\r\n        setInterval(createBlock, 1000);\r\n        gameLoop();\r\n    <\/script>\r\n<\/body>\r\n<\/html>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Falling Blocks Game Stanga Dreapta<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"postBodyCss":"","postBodyMargin":[],"postBodyPadding":[],"postBodyBackground":{"backgroundType":"classic","gradient":""},"footnotes":""},"categories":[47],"tags":[],"class_list":["post-10907","post","type-post","status-publish","format-standard","hentry","category-jocuri"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Falling Blocks Game - Clinica stomatologic\u0103 iDentist - Dr.Marcu<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Falling Blocks Game - Clinica stomatologic\u0103 iDentist - Dr.Marcu\" \/>\n<meta property=\"og:description\" content=\"Falling Blocks Game Stanga Dreapta\" \/>\n<meta property=\"og:url\" content=\"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/\" \/>\n<meta property=\"og:site_name\" content=\"Clinica stomatologic\u0103 iDentist - Dr.Marcu\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/clinicaidentist\" \/>\n<meta property=\"article:published_time\" content=\"2000-02-04T23:34:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-02T10:19:39+00:00\" \/>\n<meta name=\"author\" content=\"Tudor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tudor\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/\"},\"author\":{\"name\":\"Tudor\",\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/#\\\/schema\\\/person\\\/831a1bd68f0727c624629ecc9a55fc32\"},\"headline\":\"Falling Blocks Game\",\"datePublished\":\"2000-02-04T23:34:14+00:00\",\"dateModified\":\"2026-04-02T10:19:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/\"},\"wordCount\":8,\"articleSection\":[\"Jocuri\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/\",\"url\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/\",\"name\":\"Falling Blocks Game - Clinica stomatologic\u0103 iDentist - Dr.Marcu\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/#website\"},\"datePublished\":\"2000-02-04T23:34:14+00:00\",\"dateModified\":\"2026-04-02T10:19:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/#\\\/schema\\\/person\\\/831a1bd68f0727c624629ecc9a55fc32\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/falling-blocks-game\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prima pagin\u0103\",\"item\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Falling Blocks Game\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/\",\"name\":\"Clinica stomatologic\u0103 iDentist - Dr.Marcu\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/#\\\/schema\\\/person\\\/831a1bd68f0727c624629ecc9a55fc32\",\"name\":\"Tudor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e4b51ee49be7561eb320a317e34aa053914c021a47ecf2ad4cfe9ca08083ae65?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e4b51ee49be7561eb320a317e34aa053914c021a47ecf2ad4cfe9ca08083ae65?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e4b51ee49be7561eb320a317e34aa053914c021a47ecf2ad4cfe9ca08083ae65?s=96&d=mm&r=g\",\"caption\":\"Tudor\"},\"url\":\"https:\\\/\\\/i-dentist.ro\\\/en\\\/author\\\/tudor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Falling Blocks Game - Clinica stomatologic\u0103 iDentist - Dr.Marcu","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/","og_locale":"en_US","og_type":"article","og_title":"Falling Blocks Game - Clinica stomatologic\u0103 iDentist - Dr.Marcu","og_description":"Falling Blocks Game Stanga Dreapta","og_url":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/","og_site_name":"Clinica stomatologic\u0103 iDentist - Dr.Marcu","article_publisher":"https:\/\/www.facebook.com\/clinicaidentist","article_published_time":"2000-02-04T23:34:14+00:00","article_modified_time":"2026-04-02T10:19:39+00:00","author":"Tudor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tudor"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/#article","isPartOf":{"@id":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/"},"author":{"name":"Tudor","@id":"https:\/\/i-dentist.ro\/en\/#\/schema\/person\/831a1bd68f0727c624629ecc9a55fc32"},"headline":"Falling Blocks Game","datePublished":"2000-02-04T23:34:14+00:00","dateModified":"2026-04-02T10:19:39+00:00","mainEntityOfPage":{"@id":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/"},"wordCount":8,"articleSection":["Jocuri"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/","url":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/","name":"Falling Blocks Game - Clinica stomatologic\u0103 iDentist - Dr.Marcu","isPartOf":{"@id":"https:\/\/i-dentist.ro\/en\/#website"},"datePublished":"2000-02-04T23:34:14+00:00","dateModified":"2026-04-02T10:19:39+00:00","author":{"@id":"https:\/\/i-dentist.ro\/en\/#\/schema\/person\/831a1bd68f0727c624629ecc9a55fc32"},"breadcrumb":{"@id":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/i-dentist.ro\/en\/falling-blocks-game\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/i-dentist.ro\/en\/falling-blocks-game\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Prima pagin\u0103","item":"https:\/\/i-dentist.ro\/en\/"},{"@type":"ListItem","position":2,"name":"Falling Blocks Game"}]},{"@type":"WebSite","@id":"https:\/\/i-dentist.ro\/en\/#website","url":"https:\/\/i-dentist.ro\/en\/","name":"Clinica stomatologic\u0103 iDentist - Dr.Marcu","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/i-dentist.ro\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/i-dentist.ro\/en\/#\/schema\/person\/831a1bd68f0727c624629ecc9a55fc32","name":"Tudor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e4b51ee49be7561eb320a317e34aa053914c021a47ecf2ad4cfe9ca08083ae65?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e4b51ee49be7561eb320a317e34aa053914c021a47ecf2ad4cfe9ca08083ae65?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e4b51ee49be7561eb320a317e34aa053914c021a47ecf2ad4cfe9ca08083ae65?s=96&d=mm&r=g","caption":"Tudor"},"url":"https:\/\/i-dentist.ro\/en\/author\/tudor\/"}]}},"_links":{"self":[{"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/posts\/10907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/comments?post=10907"}],"version-history":[{"count":5,"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/posts\/10907\/revisions"}],"predecessor-version":[{"id":11590,"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/posts\/10907\/revisions\/11590"}],"wp:attachment":[{"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/media?parent=10907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/categories?post=10907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i-dentist.ro\/en\/wp-json\/wp\/v2\/tags?post=10907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}