← back to Model Arena
data/artifacts/035b7009e366/qwen25-7b.html
127 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DESIGNER WALLCOVERINGS</title>
<style>
:root {
--bg: #f7efe6;
--surface: #fff9f1;
--text: #3a2c22;
--muted: #a08c7a;
--accent: #c65f38;
--line: 1px solid var(--muted);
--shadow: 0 8px 24px rgba(0,0,0,.12), hover 0 16px 48px rgba(0,0,0,.18);
--ease: cubic-bezier(.22,1,.36,1);
}
body {
margin: 0;
overflow: hidden;
background-color: var(--bg);
color: var(--text);
font-family: 'Didot', Georgia, serif;
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
header {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: var(--surface);
padding: 24px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--shadow);
}
header .logo {
font-size: 38px;
letter-spacing: .15em;
text-transform: uppercase;
}
header button {
background-color: transparent;
border: none;
color: var(--accent);
cursor: pointer;
font-size: 12px;
letter-spacing: .15em;
text-transform: uppercase;
}
canvas {
display: block;
}
</style>
</head>
<body>
<header>
<div class="logo">DESIGNER WALLCOVERINGS</div>
<button>Restart</button>
</header>
<canvas id="gameCanvas" width="800" height="600"></canvas>
<script>
const canvas = document.getElementById('gameCanvas');
const ctx = canvas.getContext('2d');
let score = 0;
let bestScore = localStorage.getItem('bestScore') || 0;
function draw() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Draw walls and wallpaper rolls
ctx.fillStyle = 'white';
ctx.fillRect(0, 280, canvas.width, 320);
ctx.strokeStyle = '#c65f38';
ctx.strokeRect(0, 100, canvas.width, 180);
ctx.fillStyle = '#c65f38';
ctx.fillRect(0, 100, canvas.width, 40);
// Draw roller
ctx.fillStyle = 'black';
ctx.fillRect(20, 275, 30, 30);
// Update score and best score
ctx.font = 'bold 28px Didot';
ctx.textAlign = 'center';
ctx.fillText(`Score: ${score} | Best Score: ${bestScore}`, canvas.width / 2, 40);
}
function update() {
const rollerY = 275;
score++;
if (score > bestScore) {
bestScore = score;
localStorage.setItem('bestScore', bestScore);
}
requestAnimationFrame(update);
draw();
}
update();
document.addEventListener('keydown', e => {
if (e.code === 'Space' || e.key === 'ArrowUp') {
// Jump logic
}
});
</script>
</body>
</html>