2025-01-05 01:59:00 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>Snake - Game</title>
|
|
|
|
<link rel="stylesheet" href="styles.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="gameboy">
|
|
|
|
<!-- Game Boy Screen -->
|
|
|
|
<div class="screen">
|
|
|
|
<article class="game">
|
2025-01-05 03:20:42 +01:00
|
|
|
<h1 class="title" id="title">Snake - Game</h1>
|
|
|
|
<div class="description" id="description">
|
2025-01-05 01:59:00 +01:00
|
|
|
<h2>Description</h2>
|
|
|
|
<p>Eat as many apples and grow as much as possible</p>
|
|
|
|
<p>◀ or A or arrow left = move left</p>
|
|
|
|
<p>▶ or D or arrow right = move right</p>
|
|
|
|
<p>▲ or W or arrow up = move up</p>
|
|
|
|
<p>▼ or S or arrow down = move down</p>
|
|
|
|
</div>
|
2025-01-06 11:24:39 +01:00
|
|
|
<canvas id="game"></canvas>
|
2025-01-05 01:59:00 +01:00
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Controls -->
|
|
|
|
<div class="controls">
|
|
|
|
<!-- D-Pad on the left -->
|
|
|
|
<div class="dpad">
|
|
|
|
<button class="dpad-btn up" id="up">▲</button>
|
|
|
|
<button class="dpad-btn left" id="left">◀</button>
|
|
|
|
<div class="dpad-center"></div>
|
|
|
|
<button class="dpad-btn right" id="right">▶</button>
|
|
|
|
<button class="dpad-btn down" id="down">▼</button>
|
|
|
|
</div>
|
|
|
|
|
2025-01-05 03:20:42 +01:00
|
|
|
<!-- A, B and start button on the right -->
|
2025-01-05 01:59:00 +01:00
|
|
|
<div class="action-buttons">
|
|
|
|
<button class="start-btn btn" id="start">Start</button>
|
|
|
|
<button class="btn" id="a">A</button>
|
|
|
|
<button class="btn" id="b">B</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script src="game.js"></script>
|
|
|
|
<script src="styles.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|