-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (36 loc) · 1.4 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Infection Game Test Jopta</title>
<link rel="stylesheet" href="covid-19.css">
</head>
<body>
<div class="covid-19-container">
<div class="covid-19-item">
<canvas id="canvas-simulation" width="500" height="500">
Your browser does not support canvas element jopta
</canvas>
<div id="control-panel">
<button onclick="killRandomPerson()">Kill 1</button>
<button onclick="infectRandomPerson()">Infect 1</button>
<button onclick="infectProb(parseFloat(prompt('P=')))">Infect P</button>
<button onclick="pauseSimulation()">Pause</button>
<button onclick="resumeSimulation()">Resume</button>
</div> <!-- #control-panel -->
<div id="status-bar">
Healthy: <span id="counter-healthy"></span> (Immune: <span id="counter-immune"></span>)
Sick: <span id="counter-sick"></span>
Dead: <span id="counter-dead"></span>
</div> <!-- #status-bar -->
</div> <!-- .covid-19-item -->
<div class="covid-19-item">
<canvas id="canvas-graph" width="500" height="500">
Your browser does not support canvas element jopta
</canvas>
</div> <!-- .covid-19-item -->
</div> <!-- .covid-19-container -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
<script src="./covid-19.js"></script>
</body>
</html>