版本比较
florr 2048
正文
增加 35 行删除 18 行
2 行未改动345677891011183 行未改动全部展开1951961971981991992002012022032042052052062072082092102112122132142152162172182192202212222232142152162172182192202212222232242252262272282293 行未改动23323423523623523723823924024124224324424524624716 行未改动26426526626726326826927027127221 行未改动29429529629729829930030130230330441 行未改动346347348349342350351352353345354355356357358359360361362363364348365366367368369201 行未改动全部展开2 行未改动<html lang="zh-CN"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, maximum-scale=1.5"> <title>Florr 2048 · 花瓣合成</title> <title>florr 2048</title> <style> * { margin: 0; padding: 0;183 行未改动全部展开<body><div class="game-wrapper"> <div class="top-bar"> <div class="score-box" id="scoreDisplay">0</div> <button class="undo-btn" id="undoButton">↩ 锦囊妙计</button> <button class="undo-btn" id="undoButton">↩ 退一步</button> </div>
<div class="grid-container" id="gridContainer"></div>
<div class="game-over-message"> <button class="restart-btn" id="restartButton">✨ 再来一次!</button> <button class="restart-btn" id="restartButton">再来一次</button> </div></div>
<div class="achievement-container" id="achievementContainer"></div>
<script> (function() { const LEVELS = [ { name: "Common", value: 1, color: "#7EEF6D", textColor: "white" }, { name: "Unusual", value: 2, color: "#FFE65D", textColor: "white" }, { name: "Rare", value: 4, color: "#4D52E3", textColor: "white" }, { name: "Epic", value: 8, color: "#861FDE", textColor: "white" }, { name: "Legendary", value: 16, color: "#DE1F1F", textColor: "white" }, { name: "Mythic", value: 32, color: "#1FDBDE", textColor: "white" }, { name: "Ultra", value: 64, color: "#FF2B75", textColor: "white" }, { name: "Super", value: 128, color: "#2BFFA3", textColor: "black" }, { name: "Eternal", value: 256, color: "#F1F1F1", textColor: "black" }, { name: "Unique", value: 512, color: "#666666", textColor: "white" } { name: "Common", value: 1, color: "#7EEF6D", textColor: "white" }, { name: "Unusual", value: 2, color: "#FFE65D", textColor: "white" }, { name: "Rare", value: 4, color: "#4D52E3", textColor: "white" }, { name: "Epic", value: 8, color: "#861FDE", textColor: "white" }, { name: "Legendary", value: 16, color: "#DE1F1F", textColor: "white" }, { name: "Mythic", value: 32, color: "#1FDBDE", textColor: "white" }, { name: "Ultra", value: 64, color: "#FF2B75", textColor: "white" }, { name: "Super", value: 128, color: "#2BFFA3", textColor: "black" }, { name: "Eternal", value: 256, color: "#F1F1F1", textColor: "black" }, { name: "Omega", value: 512, color: "#F53CE4", textColor: "white" }, { name: "Hyper", value: 1024, color: "#2253B0", textColor: "white" }, { name: "Unique", value: 2048, color: "#666666", textColor: "white" } ];
const LEVEL_MAP = new Map(); LEVELS.forEach(lvl => LEVEL_MAP.set(lvl.value, { ...lvl }));3 行未改动 let gameOver = false; let uniqueReached = false; let history = []; const MAX_HISTORY = 15; const MAX_HISTORY = 1500;
let achievementUltraShown = false; let achievementSuperShown = false; let achievementEternalShown = false; let achievementOmegaShown = false; let achievementHyperShown = false;
const gridContainer = document.getElementById('gridContainer'); const scoreDisplay = document.getElementById('scoreDisplay'); const undoButton = document.getElementById('undoButton');16 行未改动 }
function undoMove() { if (uniqueReached) { alert('Unique之力已降临,无法悔棋。'); alert('Unique已合成,无法悔棋。'); return; } if (history.length === 0) { alert('没有更早的步骤了');21 行未改动 uniqueReached = false; history = []; achievementUltraShown = false; achievementSuperShown = false; achievementEternalShown = false; achievementOmegaShown = false; achievementHyperShown = false; achievementContainer.innerHTML = ''; addRandomTile(); addRandomTile(); updateScoreUI();41 行未改动 if (mergedValue === 128 && !achievementSuperShown) { achievementSuperShown = true; showAchievementToast("合成高手:合成Super!", "#2BFFA3", "black"); } if (mergedValue === 256) { if (mergedValue === 256 && !achievementEternalShown) { achievementEternalShown = true; showAchievementToast("永恒的光芒!", "#F1F1F1", "black"); } if (mergedValue === 512) { if (mergedValue === 512 && !achievementOmegaShown) { achievementOmegaShown = true; showAchievementToast("合成大师:合成Omega!", "#F53CE4", "white"); } if (mergedValue === 1024 && !achievementHyperShown) { achievementHyperShown = true; showAchievementToast("人上人:合成Hyper!", "#2253B0", "white"); } if (mergedValue === 2048) { uniqueReached = true; gameOver = true; showAchievementToast("唯一之力!", "#666666", "white"); showAchievementToast("Unique!", "#666666", "white"); restartButton.classList.add('show'); renderGrid(); } }201 行未改动全部展开