Help
RSS
API
Feed
Maltego
Contact
Domain > 88xiaoshuo.vip
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2025-02-14
104.21.63.111
(
ClassC
)
2026-02-17
103.82.54.209
(
ClassC
)
Port 80
HTTP/1.1 301 Moved PermanentlyServer: nginxDate: Tue, 17 Feb 2026 10:31:13 GMTContent-Type: text/htmlContent-Length: 162Connection: keep-aliveLocation: https://88xiaoshuo.vip/Strict-Transport-Security: max-age31536000 html>head>title>301 Moved Permanently/title>/head>body>center>h1>301 Moved Permanently/h1>/center>hr>center>nginx/center>/body>/html>
Port 443
HTTP/1.1 200 OKServer: nginxDate: Tue, 17 Feb 2026 10:31:14 GMTContent-Type: text/htmlContent-Length: 56398Last-Modified: Mon, 05 Jan 2026 01:39:22 GMTConnection: keep-aliveVary: Accept-EncodingETag: 695b164a-dc4eStrict-Transport-Security: max-age31536000Accept-Ranges: bytes !DOCTYPE html>html xml:langzh-CN langzh-CN>head> meta http-equivContent-Type contenttext/html; charsetUTF-8> meta http-equivx-ua-compatible contentieedge> meta nameviewport contentwidthdevice-width, initial-scale1, viewport-fitcover,user-scalableno> title>KK方块王 - 在线畅玩2048游戏 | 重温经典/title> meta namegoogle-adsense-account contentca-pub-9423408102023132> meta namekeywords contentKK方块王,2048游戏,经典游戏,怀旧游戏,在线益智游戏> meta namedescription contentKK方块王 - 重温经典。在线畅玩2048游戏,无需下载,没有限制。在工作休息或通勤途中享受这款有趣且令人上瘾的益智游戏。> link relicon hrefcss/favicon.ico typeimage/x-icon> link relshortcut icon hrefcss/favicon.ico typeimage/x-icon> meta namerenderer contentwebkit> script srccss/jquery-2.2.4.min.js>/script> link relstylesheet hrefcss/layui.css> link relstylesheet hrefcss/style.css> link relstylesheet hrefcss/aitoollist.css> script srccss/layui.js>/script> script async srchttps://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?clientca-pub-9423408102023132 crossoriginanonymous>/script> meta propertyog:title contentKK方块王 - 在线畅玩2048游戏 /> meta propertyog:description contentKK方块王 - 重温经典。在线畅玩2048游戏,无需下载,没有限制。在工作休息或通勤途中享受这款有趣且令人上瘾的益智游戏。 /> style typetext/css> /* 全局变量和基础样式 */ :root { --primary-color: #e74c3c; --secondary-color: #3498db; --accent-color: #f39c12; --success-color: #2ecc71; --warning-color: #f1c40f; --danger-color: #e67e22; --dark-color: #2c3e50; --light-color: #ecf0f1; --bg-gradient: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d); --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); --hover-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); --retro-border: 4px solid #2c3e50; } * { box-sizing: border-box; } body { font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; background: var(--bg-gradient); color: var(--dark-color); margin: 0; padding: 0; min-height: 100vh; overflow-x: hidden; } /* 头部样式 */ .site-header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); padding: 15px 0; position: sticky; top: 0; z-index: 1000; transition: all 0.3s ease; border-bottom: var(--retro-border); } .site-header:hover { box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12); } .brand { display: flex; align-items: center; animation: fadeInDown 0.8s ease; } .brand-logo { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-right: 10px; text-shadow: 0 2px 10px rgba(231, 76, 60, 0.2); position: relative; } .brand-logo:after { content: ; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); border-radius: 2px; } .brand-tagline { font-size: 14px; color: var(--secondary-color); font-weight: 500; } /* 主内容区 */ .main-content { max-width: 1200px; margin: 30px auto; padding: 0 20px; } .game-section { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 40px; } .game-container-wrapper { flex: 1; min-width: 500px; perspective: 1000px; } .game-info { flex: 1; min-width: 300px; background: rgba(255, 255, 255, 0.9); border-radius: 20px; padding: 25px; box-shadow: var(--card-shadow); transition: all 0.3s ease; backdrop-filter: blur(10px); border: var(--retro-border); } .game-info:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); } /* 游戏容器样式 */ .game-container { position: relative; padding: 20px; cursor: default; -webkit-touch-callout: none; -ms-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -ms-touch-action: none; touch-action: none; background: rgba(255, 255, 255, 0.9); border-radius: 20px; width: 520px; height: 520px; margin: 0 auto; box-shadow: var(--card-shadow); transition: all 0.3s ease; backdrop-filter: blur(10px); border: var(--retro-border); } .game-container:hover { transform: translateY(-5px) rotateX(5deg); box-shadow: var(--hover-shadow); } .grid-container { position: absolute; z-index: 1; } .grid-row { margin-bottom: 15px; } .grid-row:last-child { margin-bottom: 0; } .grid-row:after { content: ; display: block; clear: both; } .grid-cell { width: 106.25px; height: 106.25px; margin-right: 15px; float: left; border-radius: 10px; background: rgba(231, 76, 60, 0.1); transition: all 0.2s ease; box-shadow: inset 0 0 10px rgba(231, 76, 60, 0.1); border: 2px solid rgba(231, 76, 60, 0.2); } .grid-cell:hover { background: rgba(231, 76, 60, 0.15); transform: scale(1.02); } .grid-cell:last-child { margin-right: 0; } .tile-container { position: absolute; z-index: 2; } .tile, .tile .tile-inner { width: 107px; height: 107px; line-height: 107px; } /* 方块位置定位 */ .tile.tile-position-1-1 { transform: translate(0,0); } .tile.tile-position-1-2 { transform: translate(0,121px); } .tile.tile-position-1-3 { transform: translate(0,242px); } .tile.tile-position-1-4 { transform: translate(0,363px); } .tile.tile-position-2-1 { transform: translate(121px,0); } .tile.tile-position-2-2 { transform: translate(121px,121px); } .tile.tile-position-2-3 { transform: translate(121px,242px); } .tile.tile-position-2-4 { transform: translate(121px,363px); } .tile.tile-position-3-1 { transform: translate(242px,0); } .tile.tile-position-3-2 { transform: translate(242px,121px); } .tile.tile-position-3-3 { transform: translate(242px,242px); } .tile.tile-position-3-4 { transform: translate(242px,363px); } .tile.tile-position-4-1 { transform: translate(363px,0); } .tile.tile-position-4-2 { transform: translate(363px,121px); } .tile.tile-position-4-3 { transform: translate(363px,242px); } .tile.tile-position-4-4 { transform: translate(363px,363px); } .tile { position: absolute; transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94); transition-property: transform; } .tile .tile-inner { border-radius: 10px; background: var(--primary-color); text-align: center; font-weight: 800; z-index: 10; font-size: 45px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); transition: all 0.2s ease; border: 2px solid rgba(0, 0, 0, 0.1); } .tile .tile-inner:hover { transform: scale(1.05); } /* 不同数字的方块样式 - 调整为90年代风格 */ .tile.tile-2 .tile-inner { color: var(--dark-color); background: linear-gradient(135deg, #ffeb3b, #fbc02d); } .tile.tile-4 .tile-inner { color: var(--dark-color); background: linear-gradient(135deg, #4caf50, #388e3c); } .tile.tile-8 .tile-inner { color: #fff; background: linear-gradient(135deg, #2196f3, #1976d2); } .tile.tile-16 .tile-inner { color: #fff; background: linear-gradient(135deg, #9c27b0, #7b1fa2); } .tile.tile-32 .tile-inner { color: #fff; background: linear-gradient(135deg, #ff9800, #f57c00); } .tile.tile-64 .tile-inner { color: #fff; background: linear-gradient(135deg, #f44336, #d32f2f); } .tile.tile-128 .tile-inner { color: #fff; background: linear-gradient(135deg, #795548, #5d4037); font-size: 35px; box-shadow: 0 5px 20px rgba(121, 85, 72, 0.4); } .tile.tile-256 .tile-inner { color: #fff; background: linear-gradient(135deg, #607d8b, #455a64); font-size: 35px; box-shadow: 0 5px 20px rgba(96, 125, 139, 0.4); } .tile.tile-512 .tile-inner { color: #fff; background: linear-gradient(135deg, #ff5722, #e64a19); font-size: 35px; box-shadow: 0 5px 20px rgba(255, 87, 34, 0.4); } .tile.tile-1024 .tile-inner { color: #fff; background: linear-gradient(135deg, #8bc34a, #689f38); font-size: 30px; box-shadow: 0 5px 20px rgba(139, 195, 74, 0.4); } .tile.tile-2048 .tile-inner { color: #fff; background: linear-gradient(135deg, #e91e63, #c2185b); font-size: 30px; box-shadow: 0 5px 20px rgba(233, 30, 99, 0.4); animation: glow 2s infinite alternate; } .tile.tile-super .tile-inner { color: #fff; background: linear-gradient(135deg, #3f51b5, #303f9f); font-size: 25px; box-shadow: 0 5px 20px rgba(63, 81, 181, 0.6); animation: pulse 1.5s infinite; } /* 分数容器 */ .scores-container { text-align: center; padding: 1rem 0px; margin: 1.5rem auto 1rem auto; width: 500px; border-radius: 15px; background: rgba(255, 255, 255, 0.9); box-shadow: var(--card-shadow); display: flex; justify-content: space-around; align-items: center; backdrop-filter: blur(10px); transition: all 0.3s ease; border: var(--retro-border); } .scores-container:hover { transform: translateY(-3px); box-shadow: var(--hover-shadow); } .score-box { display: flex; flex-direction: column; align-items: center; } .score-label { font-size: 14px; color: var(--dark-color); margin-bottom: 5px; font-weight: 600; } .score-value { font-size: 28px; font-weight: 800; color: var(--primary-color); } .best-container, .score-container { position: relative; } .best-container .score-addition, .score-container .score-addition { position: absolute; right: 30px; color: red; font-size: 25px; line-height: 25px; font-weight: 700; color: var(--accent-color); z-index: 100; animation: move-up 0.6s ease-in; animation-fill-mode: both; } /* 按钮样式 */ .game-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 20px; } .game-button { padding: 12px 25px; border: none; border-radius: 50px; font-weight: 600; font-size: 16px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; border: 2px solid rgba(0, 0, 0, 0.1); } .game-button:before { content: ; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transition: all 0.5s ease; } .game-button:hover:before { left: 100%; } .game-button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); } .game-button:active { transform: translateY(1px); } .restart-button { background: linear-gradient(135deg, var(--primary-color), var(--danger-color)); color: white; } .undo-button { background: linear-gradient(135deg, var(--warning-color), var(--accent-color)); color: white; } /* 游戏消息 */ .game-message { display: none; } .game-over { display: block !important; position: absolute; z-index: 100; width: 100%; height: 100%; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.85); text-align: center; border-radius: 20px; animation: fade-in 0.8s ease 0.5s; animation-fill-mode: both; display: flex; flex-direction: column; justify-content: center; align-items: center; } .game-over>p { font-weight: bold; height: 60px; line-height: 60px; font-size: 60px; color: white; margin: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); } .game-over .lower { display: block; margin-top: 30px; } .game-over .lower a { display: inline-block; background: var(--primary-color); border-radius: 50px; padding: 0 30px; text-decoration: none; color: #f9f6f2 !important; height: 50px; line-height: 50px; font-weight: 600; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4); } .game-over .lower a:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(231, 76, 60, 0.6); } /* 动画定义 */ @keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes move-up { 0% { top: 25px; opacity: 1; } 100% { top: -50px; opacity: 0; } } @keyframes appear { 0% { opacity: 0; transform: scale(0); } 50% { transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } } @keyframes pop { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } @keyframes glow { from { box-shadow: 0 5px 20px rgba(233, 30, 99, 0.4); } to { box-shadow: 0 5px 30px rgba(233, 30, 99, 0.8); } } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } /* 方块动画 */ .tile-new .tile-inner { animation: appear 0.3s ease 0.1s; animation-fill-mode: backwards; } .tile-merged .tile-inner { z-index: 20; animation: pop 0.3s ease 0.1s; animation-fill-mode: backwards; } /* 响应式设计 */ @media screen and (max-width: 1100px) { .game-section { flex-direction: column; align-items: center; } .game-container-wrapper, .game-info { width: 100%; min-width: auto; } } @media screen and (max-width: 520px) { .scores-container { width: 290px; flex-direction: column; gap: 15px; } .game-container { position: relative; padding: 10px; width: 290px; height: 290px; box-sizing: border-box; } .grid-container { position: absolute; z-index: 1; } .grid-row { margin-bottom: 10px; } .grid-row:last-child { margin-bottom: 0; } .grid-cell { width: 57.5px; height: 57.5px; margin-right: 10px; border-radius: 5px; } .grid-cell:last-child { margin-right: 0; } .tile-container { position: absolute; z-index: 2; } .tile, .tile .tile-inner { width: 58px; height: 58px; line-height: 58px; } .tile.tile-position-1-1 { transform: translate(0,0); } .tile.tile-position-1-2 { transform: translate(0,67px); } .tile.tile-position-1-3 { transform: translate(0,135px); } .tile.tile-position-1-4 { transform: translate(0,202px); } .tile.tile-position-2-1 { transform: translate(67px,0); } .tile.tile-position-2-2 { transform: translate(67px,67px); } .tile.tile-position-2-3 { transform: translate(67px,135px); } .tile.tile-position-2-4 { transform: translate(67px,202px); } .tile.tile-position-3-1 { transform: translate(135px,0); } .tile.tile-position-3-2 { transform: translate(135px,67px); } .tile.tile-position-3-3 { transform: translate(135px,135px); } .tile.tile-position-3-4 { transform: translate(135px,202px); } .tile.tile-position-4-1 { transform: translate(202px,0); } .tile.tile-position-4-2 { transform: translate(202px,67px); } .tile.tile-position-4-3 { transform: translate(202px,135px); } .tile.tile-position-4-4 { transform: translate(202px,202px); } .tile .tile-inner { font-size: 20px; border-radius: 5px; } .tile.tile-128 .tile-inner { font-size: 16px; } .tile.tile-256 .tile-inner { font-size: 16px; } .tile.tile-512 .tile-inner { font-size: 16px; } .tile.tile-1024 .tile-inner { font-size: 14px; } .tile.tile-2048 .tile-inner { font-size: 14px; } .tile.tile-super .tile-inner { font-size: 12px; } .game-over>p { height: 30px; line-height: 30px; font-size: 30px; margin-top: 0; } .game-over .lower { margin-top: 20px; } .game-over .lower a { height: 40px; line-height: 40px; } .game-buttons { flex-direction: column; align-items: center; } .game-button { width: 80%; } } /* 页脚样式 */ .site-footer { background: rgba(255, 255, 255, 0.9); padding: 30px 0; margin-top: 50px; text-align: center; backdrop-filter: blur(10px); border-top: var(--retro-border); } .footer-links { margin-bottom: 20px; } .footer-links a { color: var(--primary-color); text-decoration: none; margin: 0 10px; font-weight: 500; transition: all 0.3s ease; } .footer-links a:hover { color: var(--accent-color); } .copyright { color: var(--dark-color); font-size: 14px; } /* 游戏说明区域 */ .game-instructions { background: rgba(255, 255, 255, 0.9); border-radius: 20px; padding: 30px; margin-top: 40px; box-shadow: var(--card-shadow); backdrop-filter: blur(10px); transition: all 0.3s ease; border: var(--retro-border); } .game-instructions:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); } .instructions-title { font-size: 24px; color: var(--primary-color); margin-bottom: 20px; text-align: center; font-weight: 700; } .instructions-content { line-height: 1.6; } .instructions-content h3 { color: var(--primary-color); margin-top: 25px; margin-bottom: 10px; } .instructions-content ul { padding-left: 20px; } .instructions-content li { margin-bottom: 8px; } .highlight { background: linear-gradient(120deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.2) 100%); padding: 2px 6px; border-radius: 4px; font-weight: 600; } /* 90年代风格装饰元素 */ .retro-decoration { position: absolute; font-size: 120px; font-weight: 900; color: rgba(255, 255, 255, 0.03); z-index: -1; user-select: none; } .decoration-1 { top: 10%; left: 5%; animation: float 20s infinite linear; } .decoration-2 { top: 20%; right: 5%; animation: float 25s infinite linear reverse; } .decoration-3 { bottom: 15%; left: 10%; animation: float 30s infinite linear; } @keyframes float { 0% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(180deg); } 100% { transform: translateY(0) rotate(360deg); } } /* 90年代风格像素边框 */ .pixel-border { border-style: solid; border-width: 4px; border-image: repeating-linear-gradient(45deg, #e74c3c, #e74c3c 10px, #3498db 10px, #3498db 20px) 10; } /* 新增90年代风格元素 */ .retro-badge { display: inline-block; background: var(--primary-color); color: white; padding: 5px 10px; border-radius: 5px; font-size: 12px; font-weight: bold; margin-left: 10px; transform: rotate(-5deg); box-shadow: 2px 2px 0 rgba(0,0,0,0.2); } /style>/head>body classclear> !-- 90年代风格装饰元素 --> div classretro-decoration decoration-1>90S/div> div classretro-decoration decoration-2>GAME/div> div classretro-decoration decoration-3>FUN/div> !-- 网站头部 --> header classsite-header> div classmain-content container d-flex justify-content-between align-items-center> div classbrand> div classbrand-logo>KK方块王/div> div classbrand-tagline>重温经典/div> span classretro-badge>怀旧版/span> /div> /div> /header> !-- 主内容区 --> div classmain-content> div classgame-section> div classgame-container-wrapper> div classgame-container b98719021e> div classgame-message 8b58193fbd> p>/p> div classlower 6bac833922> a classkeep-playing-button 01d13d42c2 styledisplay:none;>继续游戏/a> a classretry-button 01d13d42c2>再试一次/a> /div> /div> div classgrid-container 16a9cf7b63> div classgrid-row 16c207d767> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> /div> div classgrid-row 16c207d767> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> /div> div classgrid-row 16c207d767> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> /div> div classgrid-row 16c207d767> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> div classgrid-cell ac00f5b4c6>/div> /div> /div> div classtile-container 26bbdfbb8f> div classtile tile-2 tile-position-2-3 tile-new> div classtile-inner>2/div> /div> div classtile tile-2 tile-position-3-4 tile-new> div classtile-inner>2/div> /div> /div> /div> div classscores-container edf05e67be> div classscore-box> div classscore-label>当前分数/div> div classscore-value score-container dbebe3bfaf>0/div> /div> div classscore-box> div classscore-label>最高分数/div> div classscore-value best-container 73f0f3fb41>2984/div> /div> div classscore-box> div classscore-label>撤销次数/div> div classscore-value undo-count>3/div> /div> /div> div classgame-buttons> button classgame-button restart-button>新游戏/button> button classgame-button undo-button>撤销上一步/button> /div> /div> div classgame-info> h2 stylecolor: var(--primary-color); margin-top: 0;>KK方块王 - 2048游戏/h2> p>欢迎来到strong>KK方块王/strong>,重温经典游戏,体验90年代的纯粹游戏乐趣!/p> h3>游戏特色/h3> ul> li>🎮 strong>怀旧体验/strong> - 重温90年代经典游戏的感觉/li> li>🏆 strong>经典玩法/strong> - 原汁原味的2048游戏体验/li> li>↩️ strong>撤销功能/strong> - 每局游戏有3次撤销机会/li> li>📱 strong>全平台支持/strong> - 在手机和电脑上都能完美体验/li> li>💾 strong>进度保存/strong> - 您的游戏进度会自动保存/li> /ul> h3>如何开始/h3> p>使用strong>方向键/strong>(电脑)或strong>滑动/strong>(手机)移动方块,将相同数字的方块合并,目标是创建strong>2048/strong>方块!/p> div stylebackground: rgba(231, 76, 60, 0.1); padding: 15px; border-radius: 10px; margin-top: 20px; border: 2px dashed var(--primary-color);> h4 stylemargin-top: 0; color: var(--primary-color);>怀旧小贴士/h4> p>像90年代的游戏高手一样思考:保持大数字在角落,有序组织小数字,创造连锁反应!/p> /div> /div> /div> div classgame-instructions> div classinstructions-title>游戏指南与怀旧技巧/div> div classinstructions-content> h3>基本规则/h3> p>2048是在4×4的棋盘上进行的数字益智游戏。游戏开始时,棋盘上会有两个数字方块(通常是2)。/p> p>通过strong>上下左右/strong>移动所有方块,当两个相同数字的方块相撞时,它们会strong>合并成一个数字翻倍的方块/strong>。/p> p>每次移动后,会在空位随机生成一个新的数字方块(2或4)。游戏目标是创建出一个strong>2048/strong>的方块。/p> h3>2048游戏策略/h3> ul> li>span classhighlight>角落固定法/span> - 将最大的数字固定在一个角落,然后围绕它建立数字序列/li> li>span classhighlight>边缘控制术/span> - 尽量保持一行或一列填满,避免随意移动打乱布局/li> li>span classhighlight>预判思维/span> - 像下棋一样提前考虑2-3步后的局面/li> li>span classhighlight>空间管理/span> - 保持棋盘上有空位,为合并创造机会/li> /ul> h3>为什么选择KK方块王?/h3> p>我们专注于重现90年代经典游戏的纯粹乐趣,没有复杂的规则,没有繁琐的操作,只有最纯粹的游戏体验。/p> p>无需下载,无需注册,打开即玩!您的游戏进度会自动保存在浏览器中,下次访问时可以继续游戏。/p> p>让我们一起回到那个游戏最纯粹的年代!/p> /div> /div> /div> !-- 网站页脚 --> footer classsite-footer> div classfooter-links> a href/>首页/a> | a hrefhttps://kkmm30.com/ target_blank>更多经典游戏/a> | a hrefterms.html>使用条款/a> /div> div classcopyright> © 2023 KK方块王. 保留所有权利. 重温经典,畅享游戏乐趣! /div> /footer> !-- JavaScript代码保持不变 --> script>// 所有游戏JavaScript代码保持不变function KeyboardInputManager() { this.events {}; if (window.navigator.msPointerEnabled) { this.eventTouchstart MSPointerDown; this.eventTouchmove MSPointerMove; this.eventTouchend MSPointerUp } else { this.eventTouchstart touchstart; this.eventTouchmove touchmove; this.eventTouchend touchend } this.listen()}KeyboardInputManager.prototype.on function(event, callback) { if (!this.eventsevent) { this.eventsevent } this.eventsevent.push(callback)};KeyboardInputManager.prototype.emit function(event, data) { var callbacks this.eventsevent; if (callbacks) { callbacks.forEach(function(callback) { callback(data) }) }};KeyboardInputManager.prototype.listen function() { var self this; var map { 38: 0, 39: 1, 40: 2, 37: 3, 75: 0, 76: 1, 74: 2, 72: 3, 87: 0, 68: 1, 83: 2, 65: 3 }; document.addEventListener(keydown, function(event) { var modifiers event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; var mapped mapevent.which; if (!modifiers) { if (mapped ! undefined) { event.preventDefault(); self.emit(move, mapped) } } if (!modifiers && event.which 82) { self.restart.call(self, event) } if (!modifiers && event.which 90 && event.ctrlKey) { // Ctrl+Z undo self.emit(undo) } }); this.bindButtonPress(.retry-button, this.restart); this.bindButtonPress(.restart-button, this.restart); this.bindButtonPress(.undo-button, this.undo); this.bindButtonPress(.keep-playing-button, this.keepPlaying); var touchStartClientX, touchStartClientY; var gameContainer document.getElementsByClassName(game-container)0; gameContainer.addEventListener(this.eventTouchstart, function(event) { if ((!window.navigator.msPointerEnabled && event.touches.length > 1) || event.targetTouches > 1) { return } if (window.navigator.msPointerEnabled) { touchStartClientX event.pageX; touchStartClientY event.pageY } else { touchStartClientX event.touches0.clientX; touchStartClientY event.touches0.clientY } event.preventDefault() }); gameContainer.addEventListener(this.eventTouchmove, function(event) { event.preventDefault() }); gameContainer.addEventListener(this.eventTouchend, function(event) { if ((!window.navigator.msPointerEnabled && event.touches.length > 0) || event.targetTouches > 0) { return } var touchEndClientX, touchEndClientY; if (window.navigator.msPointerEnabled) { touchEndClientX event.pageX; touchEndClientY event.pageY } else { touchEndClientX event.changedTouches0.clientX; touchEndClientY event.changedTouches0.clientY } var dx touchEndClientX - touchStartClientX; var absDx Math.abs(dx); var dy touchEndClientY - touchStartClientY; var absDy Math.abs(dy); if (Math.max(absDx, absDy) > 10) { self.emit(move, absDx > absDy ? (dx > 0 ? 1 : 3) : (dy > 0 ? 2 : 0)) } })};KeyboardInputManager.prototype.restart function(event) { event.preventDefault(); this.emit(restart)};KeyboardInputManager.prototype.undo function(event) { event.preventDefault(); this.emit(undo)};KeyboardInputManager.prototype.keepPlaying function(event) { event.preventDefault(); this.emit(keepPlaying)};KeyboardInputManager.prototype.bindButtonPress function(selector, fn) { var button document.querySelector(selector); button.addEventListener(click, fn.bind(this)); button.addEventListener(this.eventTouchend, fn.bind(this))};function HTMLActuator() { this.tileContainer document.querySelector(.tile-container); this.scoreContainer document.querySelector(.score-container); this.bestContainer document.querySelector(.best-container); this.messageContainer document.querySelector(.game-message); this.undoCountContainer document.querySelector(.undo-count); this.score 0}HTMLActuator.prototype.actuate function(grid, metadata) { var self this; window.requestAnimationFrame(function() { self.clearContainer(self.tileContainer); grid.cells.forEach(function(column) { column.forEach(function(cell) { if (cell) { self.addTile(cell) } }) }); self.updateScore(metadata.score); self.updateBestScore(metadata.bestScore); self.updateUndoCount(metadata.undoCount); if (metadata.terminated) { if (metadata.over) { self.message(false) } else if (metadata.won) { self.message(true) } } })};HTMLActuator.prototype.continueGame function() { this.clearMessage()};HTMLActuator.prototype.clearContainer function(container) { while (container.firstChild) { container.removeChild(container.firstChild) }};HTMLActuator.prototype.addTile function(tile) { var self this; var wrapper document.createElement(div); var inner document.createElement(div); var position tile.previousPosition || { x: tile.x, y: tile.y }; var positionClass this.positionClass(position); var classes tile, tile- + tile.value, positionClass; if (tile.value > 2048) classes.push(tile-super); this.applyClasses(wrapper, classes); inner.classList.add(tile-inner); inner.textContent tile.value; if (tile.previousPosition) { window.requestAnimationFrame(function() { classes2 self.positionClass({ x: tile.x, y: tile.y }); self.applyClasses(wrapper, classes) }) } else if (tile.mergedFrom) { classes.push(tile-merged); this.applyClasses(wrapper, classes); tile.mergedFrom.forEach(function(merged) { self.addTile(merged) }) } else { classes.push(tile-new); this.applyClasses(wrapper, classes) } wrapper.appendChild(inner); this.tileContainer.appendChild(wrapper)};HTMLActuator.prototype.applyClasses function(element, classes) { element.setAttribute(class, classes.join( ))};HTMLActuator.prototype.normalizePosition function(position) { return { x: position.x + 1, y: position.y + 1 }};HTMLActuator.prototype.positionClass function(position) { position this.normalizePosition(position); return tile-position- + position.x + - + position.y};HTMLActuator.prototype.updateScore function(score) { this.clearContainer(this.scoreContainer); var difference score - this.score; this.score score; this.scoreContainer.textContent this.score; if (difference > 0) { var addition document.createElement(div); addition.classList.add(score-addition); addition.textContent + + difference; this.scoreContainer.appendChild(addition) }};HTMLActuator.prototype.updateBestScore function(bestScore) { this.bestContainer.textContent bestScore};HTMLActuator.prototype.updateUndoCount function(undoCount) { this.undoCountContainer.textContent undoCount};HTMLActuator.prototype.message function(won) { var type won ? game-won : game-over; var message won ? 你赢了! : 游戏结束!; this.messageContainer.classList.add(type); this.messageContainer.getElementsByTagName(p)0.textContent message; // 游戏结束时添加PV统计 if (!won) { setTimeout(function() { // 在此处添加统计代码或广告显示逻辑 console.log(游戏结束,添加PV统计); // 模拟广告显示 if (Math.random() 1) { // 0.770%显示广告的几率 if (confirm(游戏结束!想再玩一次吗?点击确定重新加载页面)) { location.reload(); } } }, 1500); }};HTMLActuator.prototype.clearMessage function() { this.messageContainer.classList.remove(game-won); this.messageContainer.classList.remove(game-over)};function Grid(size, previousState) { this.size size; this.cells previousState ? this.fromState(previousState) : this.empty()}Grid.prototype.empty function() { var cells ; for (var x 0; x this.size; x++) { var row cellsx ; for (var y 0; y this.size; y++) { row.push(null) } } return cells};Grid.prototype.fromState function(state) { var cells ; for (var x 0; x this.size; x++) { var row cellsx ; for (var y 0; y this.size; y++) { var tile statexy; row.push(tile ? new Tile(tile.position, tile.value) : null) } } return cells};Grid.prototype.randomAvailableCell function() { var cells this.availableCells(); if (cells.length) { return cellsMath.floor(Math.random() * cells.length) }};Grid.prototype.availableCells function() { var cells ; this.eachCell(function(x, y, tile) { if (!tile) { cells.push({ x: x, y: y }) } }); return cells};Grid.prototype.eachCell function(callback) { for (var x 0; x this.size; x++) { for (var y 0; y this.size; y++) { callback(x, y, this.cellsxy) } }};Grid.prototype.cellsAvailable function() { return !!this.availableCells().length};Grid.prototype.cellAvailable function(cell) { return !this.cellOccupied(cell)};Grid.prototype.cellOccupied function(cell) { return !!this.cellContent(cell)};Grid.prototype.cellContent function(cell) { if (this.withinBounds(cell)) { return this.cellscell.xcell.y } else { return null }};Grid.prototype.insertTile function(tile) { this.cellstile.xtile.y tile};Grid.prototype.removeTile function(tile) { this.cellstile.xtile.y null};Grid.prototype.withinBounds function(position) { return position.x > 0 && position.x this.size && position.y > 0 && position.y this.size};Grid.prototype.serialize function() { var cellState ; for (var x 0; x this.size; x++) { var row cellStatex ; for (var y 0; y this.size; y++) { row.push(this.cellsxy ? this.cellsxy.serialize() : null) } } return { size: this.size, cells: cellState }};function Tile(position, value) { this.x position.x; this.y position.y; this.value value || 2; this.previousPosition null; this.mergedFrom null}Tile.prototype.savePosition function() { this.previousPosition { x: this.x, y: this.y }};Tile.prototype.updatePosition function(position) { this.x position.x; this.y position.y};Tile.prototype.serialize function() { return { position: { x: this.x, y: this.y }, value: this.value }};window.fakeStorage { _data: {}, setItem: function(id, val) { return this._dataid String(val) }, getItem: function(id) { return this._data.hasOwnProperty(id) ? this._dataid : undefined }, removeItem: function(id) { return delete this._dataid }, clear: function() { return this._data {} }};function LocalStorageManager() { this.bestScoreKey bestScore; this.gameStateKey gameState; this.undoHistoryKey undoHistory; var supported this.localStorageSupported(); this.storage supported ? window.localStorage : window.fakeStorage}LocalStorageManager.prototype.localStorageSupported function() { var testKey test; var storage window.localStorage; try { storage.setItem(testKey, 1); storage.removeItem(testKey); return true } catch (error) { return false }};LocalStorageManager.prototype.getBestScore function() { return this.storage.getItem(this.bestScoreKey) || 0};LocalStorageManager.prototype.setBestScore function(score) { this.storage.setItem(this.bestScoreKey, score)};LocalStorageManager.prototype.getGameState function() { var stateJSON this.storage.getItem(this.gameStateKey); return stateJSON ? JSON.parse(stateJSON) : null};LocalStorageManager.prototype.setGameState function(gameState) { this.storage.setItem(this.gameStateKey, JSON.stringify(gameState))};LocalStorageManager.prototype.clearGameState function() { this.storage.removeItem(this.gameStateKey)};LocalStorageManager.prototype.getUndoHistory function() { var historyJSON this.storage.getItem(this.undoHistoryKey); return historyJSON ? JSON.parse(historyJSON) : };LocalStorageManager.prototype.setUndoHistory function(history) { this.storage.setItem(this.undoHistoryKey, JSON.stringify(history))};LocalStorageManager.prototype.clearUndoHistory function() { this.storage.removeItem(this.undoHistoryKey)};function GameManager(size, InputManager, Actuator, StorageManager) { this.size size; this.inputManager new InputManager; this.storageManager new StorageManager; this.actuator new Actuator; this.startTiles 2; this.maxUndoCount 3; // 最大撤销次数 this.inputManager.on(move, this.move.bind(this)); this.inputManager.on(restart, this.restart.bind(this)); this.inputManager.on(keepPlaying, this.keepPlaying.bind(this)); this.inputManager.on(undo, this.undo.bind(this)); this.setup()}GameManager.prototype.restart function() { this.storageManager.clearGameState(); this.storageManager.clearUndoHistory(); this.actuator.continueGame(); this.setup();};GameManager.prototype.keepPlaying function() { this.keepPlaying true; this.actuator.continueGame();};GameManager.prototype.isGameTerminated function() { return this.over || (this.won && !this.keepPlaying)};GameManager.prototype.setup function() { var previousState this.storageManager.getGameState(); var undoHistory this.storageManager.getUndoHistory(); if (previousState) { this.grid new Grid(previousState.grid.size, previousState.grid.cells); this.score previousState.score; this.over previousState.over; this.won previousState.won; this.keepPlaying previousState.keepPlaying; this.undoHistory undoHistory; this.undoCount previousState.undoCount || this.maxUndoCount; } else { this.grid new Grid(this.size); this.score 0; this.over false; this.won false; this.keepPlaying false; this.undoHistory ; this.undoCount this.maxUndoCount; this.addStartTiles() } this.actuate()};GameManager.prototype.addStartTiles function() { for (var i 0; i this.startTiles; i++) { this.addRandomTile() } // 将初始状态保存到撤销历史 this.saveUndoState();};GameManager.prototype.addRandomTile function() { if (this.grid.cellsAvailable()) { var value Math.random() 0.9 ? 2 : 4; var tile new Tile(this.grid.randomAvailableCell(), value); this.grid.insertTile(tile) }};GameManager.prototype.actuate function() { if (this.storageManager.getBestScore() this.score) { this.storageManager.setBestScore(this.score) } if (this.over) { this.storageManager.clearGameState(); this.storageManager.clearUndoHistory(); } else { this.storageManager.setGameState(this.serialize()) this.storageManager.setUndoHistory(this.undoHistory) } this.actuator.actuate(this.grid, { score: this.score, over: this.over, won: this.won, bestScore: this.storageManager.getBestScore(), terminated: this.isGameTerminated(), undoCount: this.undoCount })};GameManager.prototype.serialize function() { return { grid: this.grid.serialize(), score: this.score, over: this.over, won: this.won, keepPlaying: this.keepPlaying, undoCount: this.undoCount }};GameManager.prototype.saveUndoState function() { if (this.undoHistory.length > this.maxUndoCount) { this.undoHistory.shift(); } this.undoHistory.push(this.serialize());};GameManager.prototype.undo function() { if (this.undoCount 0 || this.undoHistory.length 0 || this.isGameTerminated()) { return; } var previousState this.undoHistory.pop(); if (previousState) { this.grid new Grid(previousState.grid.size, previousState.grid.cells); this.score previousState.score; this.over previousState.over; this.won previousState.won; this.keepPlaying previousState.keepPlaying; this.undoCount--; this.actuate(); }};GameManager.prototype.prepareTiles function() { this.grid.eachCell(function(x, y, tile) { if (tile) { tile.mergedFrom null; tile.savePosition() } })};GameManager.prototype.moveTile function(tile, cell) { this.grid.cellstile.xtile.y null; this.grid.cellscell.xcell.y tile; tile.updatePosition(cell)};GameManager.prototype.move function(direction) { var self this; if (this.isGameTerminated()) return; // 将当前状态保存到撤销历史 this.saveUndoState(); var cell, tile; var vector this.getVector(direction); var traversals this.buildTraversals(vector); var moved false; this.prepareTiles(); traversals.x.forEach(function(x) { traversals.y.forEach(function(y) { cell { x: x, y: y }; tile self.grid.cellContent(cell); if (tile) { var positions self.findFarthestPosition(cell, vector); var next self.grid.cellContent(positions.next); if (next && next.value tile.value && !next.mergedFrom) { var merged new Tile(positions.next, tile.value * 2); merged.mergedFrom tile, next; self.grid.insertTile(merged); self.grid.removeTile(tile); tile.updatePosition(positions.next); self.score + merged.value; if (merged.value 2048) self.won true } else { self.moveTile(tile, positions.farthest) } if (!self.positionsEqual(cell, tile)) { moved true } } }) }); if (moved) { this.addRandomTile(); if (!this.movesAvailable()) { this.over true } this.actuate() }};GameManager.prototype.getVector function(direction) { var map { 0: { x: 0, y: -1 }, 1: { x: 1, y: 0 }, 2: { x: 0, y: 1 }, 3: { x: -1, y: 0 } }; return mapdirection};GameManager.prototype.buildTraversals function(vector) { var traversals { x: , y: }; for (var pos 0; pos this.size; pos++) { traversals.x.push(pos); traversals.y.push(pos) } if (vector.x 1) traversals.x traversals.x.reverse(); if (vector.y 1) traversals.y traversals.y.reverse(); return traversals};GameManager.prototype.findFarthestPosition function(cell, vector) { var previous; do { previous cell; cell { x: previous.x + vector.x, y: previous.y + vector.y } } while (this.grid.withinBounds(cell) && this.grid.cellAvailable(cell)); return { farthest: previous, next: cell }};GameManager.prototype.movesAvailable function() { return this.grid.cellsAvailable() || this.tileMatchesAvailable()};GameManager.prototype.tileMatchesAvailable function() { var self this; var tile; for (var x 0; x this.size; x++) { for (var y 0; y this.size; y++) { tile this.grid.cellContent({ x: x, y: y }); if (tile) { for (var direction 0; direction 4; direction++) { var vector self.getVector(direction); var cell { x: x + vector.x, y: y + vector.y }; var other self.grid.cellContent(cell); if (other && other.value tile.value) { return true } } } } } return false};GameManager.prototype.positionsEqual function(first, second) { return first.x second.x && first.y second.y};window.requestAnimationFrame(function() { new GameManager(4, KeyboardInputManager, HTMLActuator, LocalStorageManager)});layui.use(function(){ var rate layui.rate; rate.render({ elem: .pingfens, value: 5, half: true, text: true, setText: function(value){ this.span.text(value); }, });});/script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]