Neu: Blue Archive Memory
BIN
ba_memory/cards/1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
ba_memory/cards/10.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
ba_memory/cards/11.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
ba_memory/cards/12.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
ba_memory/cards/13.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ba_memory/cards/14.png
Normal file
After Width: | Height: | Size: 119 KiB |
BIN
ba_memory/cards/15.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
ba_memory/cards/16.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
ba_memory/cards/17.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
ba_memory/cards/18.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/19.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
ba_memory/cards/2.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/20.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
ba_memory/cards/21.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
ba_memory/cards/22.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
ba_memory/cards/23.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
ba_memory/cards/24.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
ba_memory/cards/25.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
ba_memory/cards/26.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
ba_memory/cards/27.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
ba_memory/cards/28.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ba_memory/cards/29.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
ba_memory/cards/3.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
ba_memory/cards/30.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
ba_memory/cards/31.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
ba_memory/cards/32.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
ba_memory/cards/4.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
ba_memory/cards/5.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
ba_memory/cards/6.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
ba_memory/cards/7.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
ba_memory/cards/8.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
ba_memory/cards/9.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
ba_memory/cards/A.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
ba_memory/cards/AA.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
ba_memory/cards/B.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
ba_memory/cards/BB.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
ba_memory/cards/C.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
ba_memory/cards/CC.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/D.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
ba_memory/cards/DD.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/E.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
ba_memory/cards/EE.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
ba_memory/cards/F.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
ba_memory/cards/FF.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
ba_memory/cards/G.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
ba_memory/cards/H.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
ba_memory/cards/I.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/J.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
ba_memory/cards/K.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
ba_memory/cards/L.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
ba_memory/cards/M.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/N.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/O.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
ba_memory/cards/P.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
ba_memory/cards/Q.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
ba_memory/cards/R.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
ba_memory/cards/S.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
ba_memory/cards/T.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
ba_memory/cards/U.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
ba_memory/cards/V.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
ba_memory/cards/W.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
ba_memory/cards/X.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
ba_memory/cards/Y.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
ba_memory/cards/Z.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
ba_memory/cards/back.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
226
ba_memory/index.html
Normal file
@ -0,0 +1,226 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Blue Archive Memory (8×8)</title>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js"></script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #f0f4f8;
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
#game-container {
|
||||
margin-top: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px 20px;
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
background: #4CAF50;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: #45a049;
|
||||
}
|
||||
|
||||
#timer {
|
||||
font-size: 24px;
|
||||
color: #2c3e50;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
canvas {
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||
border-radius: 10px;
|
||||
}
|
||||
footer {
|
||||
margin-top: 2rem;
|
||||
padding: 1rem 0;
|
||||
color: #666;
|
||||
font-size: 0.9rem;
|
||||
text-align: center;
|
||||
border-top: 1px solid #ddd;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #4CAF50;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
color: #45a049;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="game-container">
|
||||
<div id="timer">⏱️ Vergangene Zeit: 0 Minuten 00 Sekunden</div>
|
||||
<div id="canvas-container"></div>
|
||||
<div class="button-container">
|
||||
<button onclick="initializeGame()">🔄 Neustart</button>
|
||||
<button onclick="takeScreenshot()">📸 Screenshot</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let rows = 8, cols = 8;
|
||||
let cardSize = 80;
|
||||
let cards = [];
|
||||
let flippedCards = [];
|
||||
let matchedPairs = 0;
|
||||
let images = {};
|
||||
let pairs = [
|
||||
["1.png", "A.png"], ["2.png", "B.png"], ["3.png", "C.png"], ["4.png", "D.png"],
|
||||
["5.png", "E.png"], ["6.png", "F.png"], ["7.png", "G.png"], ["8.png", "H.png"],
|
||||
["9.png", "I.png"], ["10.png", "J.png"], ["11.png", "K.png"], ["12.png", "L.png"],
|
||||
["13.png", "M.png"], ["14.png", "N.png"], ["15.png", "O.png"], ["16.png", "P.png"],
|
||||
["17.png", "Q.png"], ["18.png", "R.png"], ["19.png", "S.png"], ["20.png", "T.png"],
|
||||
["21.png", "U.png"], ["22.png", "V.png"], ["23.png", "W.png"], ["24.png", "X.png"],
|
||||
["25.png", "Y.png"], ["26.png", "Z.png"], ["27.png", "AA.png"], ["28.png", "BB.png"],
|
||||
["29.png", "CC.png"], ["30.png", "DD.png"], ["31.png", "EE.png"], ["32.png", "FF.png"]
|
||||
];
|
||||
let startTime, clearTime, gameOver;
|
||||
|
||||
function preload() {
|
||||
images["back"] = loadImage("cards/back.png");
|
||||
for (let pair of pairs) {
|
||||
images[pair[0]] = loadImage("cards/" + pair[0]);
|
||||
images[pair[1]] = loadImage("cards/" + pair[1]);
|
||||
}
|
||||
}
|
||||
|
||||
function setup() {
|
||||
let canvas = createCanvas(cols * cardSize, rows * cardSize);
|
||||
canvas.parent('canvas-container');
|
||||
initializeGame();
|
||||
}
|
||||
|
||||
function initializeGame() {
|
||||
cards = [];
|
||||
flippedCards = [];
|
||||
matchedPairs = 0;
|
||||
gameOver = false;
|
||||
|
||||
let tempCards = [];
|
||||
for (let pair of pairs) {
|
||||
tempCards.push({ id: pair[0], img: images[pair[0]], pair: pair[1] });
|
||||
tempCards.push({ id: pair[1], img: images[pair[1]], pair: pair[0] });
|
||||
}
|
||||
shuffle(tempCards, true);
|
||||
|
||||
for (let i = 0; i < rows; i++) {
|
||||
for (let j = 0; j < cols; j++) {
|
||||
let index = i * cols + j;
|
||||
cards.push({
|
||||
x: j * cardSize,
|
||||
y: i * cardSize,
|
||||
...tempCards[index],
|
||||
flipped: false,
|
||||
matched: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
startTime = millis();
|
||||
select('#timer').html(`⏱️ Vergangene Zeit: ${formatTime(0)}`);
|
||||
}
|
||||
|
||||
function draw() {
|
||||
background(255);
|
||||
for (let card of cards) {
|
||||
if (card.flipped || card.matched) {
|
||||
image(card.img, card.x, card.y, cardSize, cardSize);
|
||||
} else {
|
||||
image(images["back"], card.x, card.y, cardSize, cardSize);
|
||||
}
|
||||
}
|
||||
|
||||
if (!gameOver) {
|
||||
select('#timer').html(`⏱️ Vergangene Zeit: ${formatTime(millis() - startTime)}`);
|
||||
}
|
||||
}
|
||||
|
||||
function mousePressed() {
|
||||
if (flippedCards.length >= 2 || gameOver) return;
|
||||
|
||||
for (let card of cards) {
|
||||
if (!card.flipped && !card.matched &&
|
||||
mouseX > card.x && mouseX < card.x + cardSize &&
|
||||
mouseY > card.y && mouseY < card.y + cardSize) {
|
||||
card.flipped = true;
|
||||
flippedCards.push(card);
|
||||
|
||||
if (flippedCards.length === 2) {
|
||||
setTimeout(checkMatch, 1000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkMatch() {
|
||||
let [card1, card2] = flippedCards;
|
||||
if (card1.pair === card2.id) {
|
||||
card1.matched = true;
|
||||
card2.matched = true;
|
||||
matchedPairs++;
|
||||
if (matchedPairs === pairs.length) {
|
||||
clearTime = millis() - startTime;
|
||||
select('#timer').html(`🎉 Gewonnen! Zeit: ${formatTime(clearTime)}`);
|
||||
gameOver = true;
|
||||
}
|
||||
} else {
|
||||
card1.flipped = false;
|
||||
card2.flipped = false;
|
||||
}
|
||||
flippedCards = [];
|
||||
}
|
||||
|
||||
function takeScreenshot() {
|
||||
let filename = `memory_${new Date().toISOString().slice(0,10)}.png`;
|
||||
saveCanvas(filename, 'png');
|
||||
}
|
||||
|
||||
function formatTime(ms) {
|
||||
let totalSeconds = Math.floor(ms / 1000);
|
||||
let minutes = Math.floor(totalSeconds / 60);
|
||||
let seconds = totalSeconds % 60;
|
||||
return `${minutes} Minuten ${seconds.toString().padStart(2, '0')} Sekunden`;
|
||||
}
|
||||
</script>
|
||||
<footer>
|
||||
<p>Basierend auf einem Projekt von
|
||||
<a href="https://github.com/lia-2025/memory-game-ex" target="_blank" rel="noopener noreferrer">
|
||||
Lia-2025
|
||||
</a>
|
||||
</p>
|
||||
<p>© <span id="current-year"></span> - Übersetzt & überarbeitet von Akamaru</p>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
document.getElementById('current-year').textContent = new Date().getFullYear();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -98,6 +98,10 @@
|
||||
<h2 class="tool-title">Dogify</h2>
|
||||
<p class="tool-description">Wow such doge many fun (In Arbeit)</p>
|
||||
</a>
|
||||
<a href="https://tools.ponywave.de/ba_memory" class="tool-bubble">
|
||||
<h2 class="tool-title">Blue Archive Memory</h2>
|
||||
<p class="tool-description">Memory-Spiel mit Blue Archive Charactere</p>
|
||||
</a>
|
||||
<a href="https://tools.ponywave.de/emoji" class="tool-bubble">
|
||||
<h2 class="tool-title">Emoji Rain</h2>
|
||||
<p class="tool-description">Lass es Emoji regnen!</p>
|
||||
|