{"id":640,"date":"2025-03-16T22:36:35","date_gmt":"2025-03-16T13:36:35","guid":{"rendered":"https:\/\/7enomoto.com\/?page_id=640"},"modified":"2025-03-30T23:47:39","modified_gmt":"2025-03-30T14:47:39","slug":"%e3%82%bf%e3%83%83%e3%83%97%e3%82%b2%e3%83%bc%e3%83%a0","status":"publish","type":"page","link":"https:\/\/7enomoto.com\/?page_id=640","title":{"rendered":"\u305f\u3063\u3077\u3063\u3077"},"content":{"rendered":"\n<p class=\"vk_block-margin-xxl--margin-top vk_block-margin-xxl--margin-bottom has-huge-font-size\"><\/p>\n\n\n\n<div class=\"wp-block-columns vk_block-margin-xxl--margin-top vk_block-margin-xxl--margin-bottom is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<!DOCTYPE html>\n<html lang=\"ja\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\">\n    <title>\u30b2\u30fc\u30e0\u30da\u30fc\u30b8<\/title>\n    <style>\n        \/* \u30b2\u30fc\u30e0\u30da\u30fc\u30b8\u5c02\u7528\u306eCSS *\/\n        .game-page #site-header-container,  \n        .game-page .page-header,            \n        .game-page #breadcrumb,             \n        .game-page .site-body-bottom,        \n        .game-page .site-footer-copyright {  \n            display: none !important;\n        }\n\n        \/* \u30b2\u30fc\u30e0\u753b\u9762\u306e\u30b9\u30bf\u30a4\u30eb *\/\n        #game-container {\n            width: 100vw;\n            height: 100vh;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            background-color: black;\n            color: white;\n            font-size: 24px;\n            touch-action: none; \/* \u30d4\u30f3\u30c1\u30ba\u30fc\u30e0\uff06\u30c0\u30d6\u30eb\u30bf\u30c3\u30d7\u7121\u52b9\u5316 *\/\n            overflow: hidden; \/* \u30b9\u30af\u30ed\u30fc\u30eb\u9632\u6b62 *\/\n        }\n\n        \/* \u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u30b9\u30bf\u30a4\u30eb *\/\n        #ranking-container {\n            width: 80%;\n            margin: 20px auto;\n            text-align: center;\n            position: relative;\n            z-index: 10;\n        }\n\n        table {\n            width: 100%;\n            border-collapse: collapse;\n        }\n\n        th, td {\n            border: 1px solid #ddd;\n            padding: 8px;\n            text-align: center;\n        }\n\n        th {\n            background-color: #4CAF50;\n            color: white;\n        }\n\n    <\/style>\n<\/head>\n<body>\n    <script>\n        document.addEventListener(\"DOMContentLoaded\", function() {\n            document.body.classList.add(\"game-page\");\n        });\n\n        \/\/ \u30c0\u30d6\u30eb\u30bf\u30c3\u30d7\u30ba\u30fc\u30e0\u9632\u6b62\n        let lastTouchTime = 0;\n        document.addEventListener(\"touchend\", function(event) {\n            let now = (new Date()).getTime();\n            if (now - lastTouchTime <= 300) {\n                event.preventDefault();\n            }\n            lastTouchTime = now;\n        }, { passive: false });\n\n        \/\/ \u30d4\u30f3\u30c1\u30ba\u30fc\u30e0\u9632\u6b62\uff08iOS\u5bfe\u7b56\uff09\n        document.addEventListener(\"gesturestart\", function(event) {\n            event.preventDefault();\n        }, { passive: false });\n    <\/script>\n\n    <!-- \u30b2\u30fc\u30e0\u306e\u30b3\u30f3\u30c6\u30ca -->\n    <div id=\"game-container\">\n        <p>\u30b2\u30fc\u30e0\u304c\u3053\u3053\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n    <\/div>\n\n\n<\/body>\n<\/html>\n\n\n<!DOCTYPE html>\n<html lang=\"ja\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>\u6d6e\u904a\u30dc\u30bf\u30f3\u30af\u30ea\u30c3\u30af\u30b2\u30fc\u30e0<\/title>\n    <style>\n        \/* Lightning \u306e\u30d8\u30c3\u30c0\u30fc\u3068\u30da\u30fc\u30b8\u30bf\u30a4\u30c8\u30eb\u3092\u975e\u8868\u793a (\u30b2\u30fc\u30e0\u753b\u9762\u306e\u307f) *\/ \n        .game-page .page-header {\n            display: none !important;\n        }\n\n        \/* \u30b2\u30fc\u30e0\u5168\u4f53\u306e\u30ec\u30a4\u30a2\u30a6\u30c8 *\/\n        .game-container {\n            text-align: center;\n            font-family: Arial, sans-serif;\n            background-color: #f0f0f0;\n            overflow: hidden;\n            position: fixed;\n            top: 0;\n            left: 50%;\n            transform: translateX(-50%);\n            width: 100vw;\n            height: 100vh;\n            display: flex;\n            flex-direction: column;\n            justify-content: center;\n            align-items: center;\n        }\n\n        \/* \u30b2\u30fc\u30e0\u30bf\u30a4\u30c8\u30eb\u3068\u8aac\u660e *\/\n        .game-container h1 {\n            margin-top: 10px;\n        }\n\n        \/* \u30b2\u30fc\u30e0\u306e\u30d7\u30ec\u30a4\u30a8\u30ea\u30a2 *\/\n        #game-area {\n            width: 80vw;\n            height: 80vh;\n            position: relative;\n            overflow: hidden;\n            border: 2px solid #000;\n            background-color: white;\n            display: none;\n        }\n\n        \/* \u6d6e\u904a\u30dc\u30bf\u30f3 *\/\n        .floating-button {\n            position: absolute;\n            font-size: 20px;\n            width: 60px;\n            height: 60px;\n            border: none;\n            border-radius: 50%;\n            cursor: pointer;\n            text-align: center;\n            line-height: 60px;\n            font-weight: bold;\n            transition: transform 1s ease-in-out;\n        }\n\n        .red {\n            background-color: red;\n            color: white;\n        }\n\n        .blue {\n            background-color: blue;\n            color: white;\n        }\n\n        \/* \u30b9\u30b3\u30a2\u3068\u30bf\u30a4\u30de\u30fc *\/\n        #score, #timer {\n            font-size: 20px;\n            margin-top: 10px;\n        }\n\n        \/* \u30b9\u30bf\u30fc\u30c8\u30dc\u30bf\u30f3 *\/\n        #start-button {\n            font-size: 20px;\n            padding: 15px 30px;\n            background-color: green;\n            color: white;\n            border: none;\n            cursor: pointer;\n            border-radius: 10px;\n            margin-top: 20px;\n        }\n\n        #start-button:hover {\n            background-color: darkgreen;\n        }\n    <\/style>\n<\/head>\n<body>\n\n    <div class=\"game-container\">\n\n        <button id=\"start-button\" onclick=\"startGame()\">\u30b2\u30fc\u30e0\u30b9\u30bf\u30fc\u30c8<\/button>\n\n        <div id=\"game-area\"><\/div>\n\n        <p id=\"score\">\u30b9\u30b3\u30a2: 1<\/p>\n        <p id=\"timer\">\u6b8b\u308a\u6642\u9593: 10\u79d2<\/p>\n    <\/div>\n\n    <script>\n        let score = 1;\n        let timeLeft = 10;\n        let gameActive = false;\n        let timerInterval;\n        const gameArea = document.getElementById(\"game-area\");\n        const startButton = document.getElementById(\"start-button\");\n\n        function startGame() {\n            document.body.classList.add(\"game-page\"); \/\/ \u30b2\u30fc\u30e0\u958b\u59cb\u6642\u306b\u30d8\u30c3\u30c0\u30fc\u975e\u8868\u793a\n            gameArea.style.display = \"block\";\n            startButton.style.display = \"none\";\n\n            score = 1;\n            timeLeft = 10;\n            document.getElementById(\"score\").innerText = \"\u30b9\u30b3\u30a2: \" + score;\n            document.getElementById(\"timer\").innerText = \"\u6b8b\u308a\u6642\u9593: \" + timeLeft + \"\u79d2\";\n\n            gameActive = true;\n            timerInterval = setInterval(() => {\n                timeLeft--;\n                document.getElementById(\"timer\").innerText = \"\u6b8b\u308a\u6642\u9593: \" + timeLeft + \"\u79d2\";\n\n                if (timeLeft <= 0) {\n                    clearInterval(timerInterval);\n                    endGame();\n                }\n            }, 1000);\n\n            generateButtons();\n        }\n\n        function generateButtons() {\n            for (let i = 0; i < 5; i++) {\n                createFloatingButton(\"red\", 2);\n                createFloatingButton(\"blue\", -3);\n            }\n        }\n\n        function createFloatingButton(color, value) {\n            const button = document.createElement(\"button\");\n            button.classList.add(\"floating-button\", color);\n            button.innerText = value > 0 ? \"\" : \"\";\n            button.onclick = () => updateScore(value, button);\n            gameArea.appendChild(button);\n            moveButtonSmoothly(button);\n        }\n\n        function moveButtonSmoothly(button) {\n            function randomPosition() {\n                const maxX = gameArea.clientWidth - 60;\n                const maxY = gameArea.clientHeight - 60;\n                const x = Math.random() * maxX - maxX \/ 2; \/\/ \u753b\u9762\u306e\u4e2d\u592e\u3092\u57fa\u6e96\u306b\u914d\u7f6e\n                const y = Math.random() * maxY;\n                return { x, y };\n            }\n\n            function animate() {\n                if (!gameActive) return;\n                const { x, y } = randomPosition();\n                button.style.transform = `translate(${x}px, ${y}px)`;\n                setTimeout(animate, 2000);\n            }\n\n            animate();\n        }\n\nfunction updateScore(value, button) {\n    score *= value;\n    \/\/ \u30b9\u30b3\u30a2\u30923\u6841\u533a\u5207\u308a\u3067\u8868\u793a\u3059\u308b\n    document.getElementById(\"score\").innerText = \"\u30b9\u30b3\u30a2: \" + score.toLocaleString();\n    button.remove();\n    createFloatingButton(button.classList.contains(\"red\") ? \"red\" : \"blue\", value);\n}\n\nfunction endGame() {\n    gameActive = false;\n    document.body.classList.remove(\"game-page\");\n    document.querySelectorAll(\".floating-button\").forEach(btn => btn.remove());\n    alert(\"\u30b2\u30fc\u30e0\u7d42\u4e86\uff01\u3042\u306a\u305f\u306e\u30b9\u30b3\u30a2\u306f \" + Number(score).toLocaleString() + \" \u3067\u3059\uff01\");\n\n    \/\/ \u30e9\u30f3\u30ad\u30f3\u30b0\u3092\u53d6\u5f97\u3057\u3066\u30b9\u30b3\u30a2\u3092\u6bd4\u8f03\n    fetch(\"https:\/\/7enomoto.com\/game_api.php\")\n        .then(response => response.json())\n        .then(data => {\n            let lowestRank = data.length >= 3 ? data[2].score : -1; \/\/ 3\u4f4d\u306e\u30b9\u30b3\u30a2\u3092\u53d6\u5f97\n            if (score > lowestRank) {\n                let playerName = prompt(\"3\u4f4d\u4ee5\u5185\u306b\u30e9\u30f3\u30af\u30a4\u30f3\u3057\u307e\u3057\u305f\uff01\u540d\u524d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044:\");\n                if (playerName) {\n                    saveScore(playerName, score);\n                }\n            }\n        })\n        .catch(error => console.error(\"\u30e9\u30f3\u30ad\u30f3\u30b0\u53d6\u5f97\u5931\u6557:\", error));\n\n    gameArea.style.display = \"none\";\n    startButton.style.display = \"block\";\n}\n\n\/\/ \u30b9\u30b3\u30a2\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3059\u308b\u95a2\u6570\nfunction saveScore(name, score) {\n    while (name.length > 10) {\n        alert(\"\u540d\u524d\u306f10\u6587\u5b57\u4ee5\u5185\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\");\n        name = prompt(\"\u3082\u3046\u4e00\u5ea6\u540d\u524d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044:\");\n        if (!name) return; \/\/ \u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u305f\u5834\u5408\u306f\u9001\u4fe1\u3057\u306a\u3044\n    }\n\n    fetch(\"https:\/\/7enomoto.com\/game_api.php\", {\n        method: \"POST\",\n        headers: {\n            \"Content-Type\": \"application\/json\"\n        },\n        body: JSON.stringify({ name: name, score: score })\n    })\n    .then(response => response.json())\n    .then(data => {\n        if (data.error) {\n            alert(data.error);\n        } else {\n            alert(\"\u30b9\u30b3\u30a2\u304c\u767b\u9332\u3055\u308c\u307e\u3057\u305f\uff01\");\n            fetchRanking(); \/\/ \u30e9\u30f3\u30ad\u30f3\u30b0\u3092\u66f4\u65b0\n        }\n    })\n    .catch(error => console.error(\"\u30b9\u30b3\u30a2\u767b\u9332\u5931\u6557:\", error));\n}\n    <\/script>\n\n    <!-- \u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u30b3\u30f3\u30c6\u30ca -->\n    <div id=\"ranking-container\">\n        <h2>\u30e9\u30f3\u30ad\u30f3\u30b0<\/h2>\n        <table id=\"ranking-table\">\n            <thead>\n                <tr>\n                    <th>\u9806\u4f4d<\/th>\n                    <th>\u540d\u524d<\/th>\n                    <th>\u30b9\u30b3\u30a2<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody><\/tbody>\n        <\/table>\n    <\/div>\n<div id=\"ad-container\">\n<a href=\"https:\/\/px.a8.net\/svt\/ejp?a8mat=3ZBGOK+56CP4I+5JTC+5Z6WX\" rel=\"nofollow\">\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"300\" height=\"250\" alt=\"\" src=\"https:\/\/www24.a8.net\/svt\/bgt?aid=240719924313&wid=001&eno=01&mid=s00000025896001004000&mc=1\"><\/a>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"https:\/\/www11.a8.net\/0.gif?a8mat=3ZBGOK+56CP4I+5JTC+5Z6WX\" alt=\"\">\n<p>\u3053\u3053\u306b\u5e83\u544a\u304c\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<\/div>\n<style>\n    #ad-container {\n        display: block;\n    position: absolute;\n        bottom: 1000;\n        left: 0;\n        z-index: 1000;\n        background-color: white;\n    }\n<\/style>\n\n\n    <script>\n        \/\/ \u30e9\u30f3\u30ad\u30f3\u30b0\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u8868\u793a\nfunction fetchRanking() {\n    fetch(\"https:\/\/7enomoto.com\/game_api.php\")\n        .then(response => response.json())\n        .then(data => {\n            let tableBody = document.querySelector(\"#ranking-table tbody\");\n            tableBody.innerHTML = \"\"; \/\/ \u4e00\u5ea6\u30af\u30ea\u30a2\n            data.forEach((player, index) => {\n                let formattedScore = Number(player.score).toLocaleString(); \/\/ \u30b9\u30b3\u30a2\u30923\u6841\u533a\u5207\u308a\u306b\n                let row = `<tr>\n                    <td>${index + 1}<\/td>\n                    <td>${player.name}<\/td>\n                    <td>${formattedScore}<\/td>\n                <\/tr>`;\n                tableBody.innerHTML += row;\n            });\n        })\n        .catch(error => console.error(\"\u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f:\", error));\n}\n\n        \/\/ \u30da\u30fc\u30b8\u8aad\u307f\u8fbc\u307f\u6642\u306b\u30e9\u30f3\u30ad\u30f3\u30b0\u3092\u53d6\u5f97\n        document.addEventListener(\"DOMContentLoaded\", fetchRanking);\n    <\/script>\n\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>\u30b2\u30fc\u30e0\u30da\u30fc\u30b8 \u30b2\u30fc\u30e0\u304c\u3053\u3053\u306b\u8868\u793a\u3055\u308c\u307e\u3059 \u6d6e\u904a\u30dc\u30bf\u30f3\u30af\u30ea\u30c3\u30af\u30b2\u30fc\u30e0 \u30b2\u30fc\u30e0\u30b9\u30bf\u30fc\u30c8 \u30b9\u30b3\u30a2: 1 \u6b8b\u308a\u6642\u9593: 10\u79d2 \u30e9\u30f3\u30ad\u30f3\u30b0 \u9806\u4f4d \u540d\u524d \u30b9\u30b3\u30a2 \u3053\u3053\u306b\u5e83\u544a\u304c\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"vkexunit_cta_each_option":"","footnotes":""},"class_list":["post-640","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/7enomoto.com\/index.php?rest_route=\/wp\/v2\/pages\/640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/7enomoto.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/7enomoto.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/7enomoto.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/7enomoto.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=640"}],"version-history":[{"count":104,"href":"https:\/\/7enomoto.com\/index.php?rest_route=\/wp\/v2\/pages\/640\/revisions"}],"predecessor-version":[{"id":766,"href":"https:\/\/7enomoto.com\/index.php?rest_route=\/wp\/v2\/pages\/640\/revisions\/766"}],"wp:attachment":[{"href":"https:\/\/7enomoto.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}