forked from cliffe/BreakEscape
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-container-minigame.html
More file actions
142 lines (123 loc) · 4.61 KB
/
test-container-minigame.html
File metadata and controls
142 lines (123 loc) · 4.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!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>