-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefense.html
70 lines (66 loc) · 1.77 KB
/
defense.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
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
<!doctype html>
<html>
<head>
<title>
Games
</title>
<base target="_blank">
<script src="https://epicenterprograms.github.io/standards/behavior/general.js"></script>
<script src="https://epicenterprograms.github.io/standards/behavior/storage.js"></script>
<script src="https://epicenterprograms.github.io/standards/behavior/game.js"></script>
<!--
<script src="file:///C:/Users/rtben/Documents/GitHub/standards/behavior/game.js"></script>
-->
<script src="behavior.js"></script>
<script>
G.container = "gameScreen";
var strategyMax = 5; // the highest number possible in the mastermind's strategy
var mastermind = {
strategy: [0, 0, 0],
reconsider: function () { //// document.readyState == "complete"
let s = mastermind.strategy;
S.forEach(2, function () {
s[Math.floor(Math.random() * s.length)] += [-1, 0, 1][Math.floor(Math.random() * 3)];
});
S.forEach(s, function (number) {
if (number < 0) {
number = 0;
} else if (number > strategyMax) {
number = strategyMax;
}
})
},
adapt: function (newStrategy) {
},
minions: [],
spawnMinion: function () {
}
};
S.onLoad(function () {
});
</script>
<link rel="stylesheet" href="https://epicenterprograms.github.io/standards/formatting/foundation.css">
<link rel="stylesheet" href="https://epicenterprograms.github.io/standards/formatting/game.css">
<style>
#gameScreen {
background: black;
width: 40rem;
height: 40rem;
}
</style>
</head>
<body>
<nav class="hidden-left-nav">
<iframe src="navigation.html"></iframe>
</nav>
<h1 class="main-title">
Space defense
</h1>
<main>
<section>
Shoot the invaders.
</section>
<div id="gameScreen"></div>
</main>
</body>
</html>