Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wellsousaaa
GitHub Repository: wellsousaaa/Five-Nights-at-Freddys-Web
Path: blob/main/src/components/Functions.js
270 views
1
function* Bonnie() {
2
yield* [
3
"Dinning Area",
4
"Backstage",
5
"Supply Closet",
6
"West Hall",
7
"W. Hall Corner",
8
"Door",
9
];
10
}
11
12
function* Chica() {
13
yield* [
14
"Dinning Area",
15
"Restrooms",
16
"Kitchen",
17
"East Hall",
18
"E. Hall Corner",
19
"Door",
20
];
21
}
22
23
function* Freddy() {
24
yield* [
25
"Stage",
26
"Dinning Area",
27
"Restrooms",
28
"Kitchen",
29
"East Hall",
30
"E. Hall Corner",
31
"Door",
32
];
33
}
34
35
function* Foxy() {
36
yield* ["_1", "_2", "_3"];
37
}
38
39
const changeAnimatronic = (Localization, iterator, setAnimatronics, change) => {
40
Localization = iterator.next().value;
41
setAnimatronics(change);
42
};
43
44
const checkAnimatronicsPosition = (
45
BonnieLocal,
46
ChicaLocal,
47
FreddyLocal,
48
search
49
) => {
50
let res = "";
51
if (BonnieLocal == search) {
52
res += "-b";
53
}
54
if (ChicaLocal == search) {
55
res += "-c";
56
}
57
if (FreddyLocal == search) {
58
res += "-f";
59
}
60
61
return res;
62
};
63
64
const Functions = {
65
Freddy,
66
Chica,
67
Bonnie,
68
Foxy,
69
changeAnimatronic,
70
checkAnimatronicsPosition,
71
};
72
73
export default Functions;
74
75