Files
BreakEscape/test-container-minigame.html

143 lines
4.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Container Minigame Test</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=VT323&display=swap" rel="stylesheet">
<!-- CSS Files -->
<link rel="stylesheet" href="css/minigames-framework.css">
<link rel="stylesheet" href="css/container-minigame.css">
<style>
body {
background: #1a1a1a;
color: white;
font-family: 'VT323', monospace;
margin: 0;
padding: 20px;
}
.test-container {
max-width: 800px;
margin: 0 auto;
}
.test-button {
background: #3498db;
color: white;
border: 4px solid #2980b9;
padding: 15px 30px;
cursor: pointer;
font-family: 'VT323', monospace;
font-size: 18px;
margin: 10px;
transition: background 0.3s;
}
.test-button:hover {
background: #2980b9;
}
.test-info {
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 10px;
margin: 20px 0;
}
</style>
</head>
<body>
<div class="test-container">
<h1>Container Minigame Test</h1>
<div class="test-info">
<h2>Test Data</h2>
<p>This test simulates the CEO Briefcase from the ceo_exfil.json scenario:</p>
<ul>
<li><strong>Container:</strong> CEO Briefcase (suitcase)</li>
<li><strong>Takeable:</strong> false</li>
<li><strong>Contents:</strong> Private Note + Safe Key</li>
</ul>
</div>
<button class="test-button" onclick="testContainerMinigame()">
Test Container Minigame
</button>
<button class="test-button" onclick="testTakeableContainer()">
Test Takeable Container
</button>
</div>
<!-- Minigame Framework -->
<script type="module">
import { MinigameFramework } from './js/minigames/framework/minigame-manager.js';
import { ContainerMinigame, startContainerMinigame } from './js/minigames/container/container-minigame.js';
// Make framework available globally
window.MinigameFramework = MinigameFramework;
window.startContainerMinigame = startContainerMinigame;
// Register the container minigame
MinigameFramework.registerScene('container', ContainerMinigame);
// Test data - CEO Briefcase
const testContainerItem = {
name: 'suitcase-1',
scenarioData: {
type: 'suitcase',
name: 'CEO Briefcase',
takeable: false,
observations: 'An expensive leather briefcase with a sturdy lock'
}
};
const testContents = [
{
type: 'notes',
name: 'Private Note',
takeable: true,
readable: true,
text: 'Closet keypad code: 7391 - Must move evidence to safe before audit',
observations: 'A hastily written note on expensive paper'
},
{
type: 'key',
name: 'Safe Key',
takeable: true,
key_id: 'safe_key:52,29,44,37',
observations: 'A heavy-duty safe key hidden behind server equipment'
}
];
const testTakeableContainerItem = {
name: 'suitcase-1',
scenarioData: {
type: 'suitcase',
name: 'Test Takeable Briefcase',
takeable: true,
observations: 'A briefcase that can be taken'
}
};
window.testContainerMinigame = function() {
console.log('Testing container minigame...');
startContainerMinigame(testContainerItem, testContents, false);
};
window.testTakeableContainer = function() {
console.log('Testing takeable container minigame...');
startContainerMinigame(testTakeableContainerItem, testContents, true);
};
console.log('Container minigame test page loaded');
</script>
</body>
</html>