-
Notifications
You must be signed in to change notification settings - Fork 0
/
old.txt
120 lines (112 loc) · 3.84 KB
/
old.txt
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
function orangef(cell) {
document.getElementById(cell).style.backgroundColor = orange;
document.getElementById(cell).style.border = orange;
}
function greenf(cell) {
document.getElementById(cell).style.backgroundColor = green;
document.getElementById(cell).style.border = green;
}
const array = ["p", "a", "y", "e", "e"];
let enter;
let a;
let b;
let c;
let d;
let e;
let f;
const orange = "#b59d3b"
const green = "#538d4e"
function display(rows) {
enter = prompt("enter guess 1");
document.getElementById(rows + '1').innerHTML = enter[0];
document.getElementById(rows + '2').innerHTML = enter[1];
document.getElementById(rows + '3').innerHTML = enter[2];
document.getElementById(rows + '4').innerHTML = enter[3];
document.getElementById(rows + '5').innerHTML = enter[4];
check(rows, enter)
a = "y"
}
/* else if (array.includes(Row[0]) == true) {
orangef("a1");
} else if (array.includes(Row[1]) == true) {
orangef("a2");
} else if (array.includes(Row[2]) == true) {
orangef("a3");
} else if (array.includes(Row[3]) == true) {
orangef("a4");
} else if (array.includes(Row[4]) == true) {
orangef("a5");
} else {
alert("oh no");
}
if (Row[0] == "p") {
greenf("a1")
}
if (Row[1] == "a") {
greenf("a2")
}
if (Row[2] == "y") {
greenf("a3")
}
if (Row[3] == "e") {
greenf("a4")
}
if (Row[4] == "e") {
greenf("a5")
}
*/
function chtwo() {
Rowtwo = prompt("enter guess 1");
document.getElementById('b1').innerHTML = Rowtwo[0];
document.getElementById('b2').innerHTML = Rowtwo[1];
document.getElementById('b3').innerHTML = Rowtwo[2];
document.getElementById('b4').innerHTML = Rowtwo[3];
document.getElementById('b5').innerHTML = Rowtwo[4];
checktwo(Rowtwo)
b = "y"
}
function checktwo(Row) {
if (Row == "payee") {
alert("you wim");
}
if (array.includes(Row[0]) == true) {
document.getElementById("b1").style.backgroundColor = "#b59f3b";
document.getElementById("b1").style.border = "solid #b59f3b";
}
if (array.includes(Row[1]) == true) {
document.getElementById("b2").style.backgroundColor = "#b59f3b";
document.getElementById("b2").style.border = "solid #b59f3b";
}
if (array.includes(Row[2]) == true) {
document.getElementById("b3").style.backgroundColor = "#b59f3b";
document.getElementById("b3").style.border = "solid #b59f3b";
}
if (array.includes(Row[3]) == true) {
document.getElementById("b4").style.backgroundColor = "#b59f3b";
document.getElementById("b4").style.border = "solid #b59f3b";
}
if (array.includes(Row[4]) == true) {
document.getElementById("b5").style.backgroundColor = "#b59f3b";
document.getElementById("b5").style.border = "solid #b59f3b";
}
if (Row[0] == "p") {
document.getElementById("b1").style.backgroundColor = "#538d4e";
document.getElementById("b1").style.border = "solid #538d4e";
}
if (Row[1] == "a") {
document.getElementById("b2").style.backgroundColor = "#538d4e";
document.getElementById("b2").style.border = "solid #538d4e";
}
if (Row[2] == "y") {
document.getElementById("b3").style.backgroundColor = "#538d4e";
document.getElementById("b3").style.border = "solid #538d4e";
}
if (Row[3] == "e") {
document.getElementById("b4").style.backgroundColor = "#538d4e";
document.getElementById("b4").style.border = "solid #538d4e";
}
if (Row[4] == "e") {
document.getElementById("b5").style.backgroundColor = "#538d4e";
document.getElementById("b5").style.border = "solid #538d4e";
}
}