This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bingo.js
101 lines (99 loc) · 2.17 KB
/
bingo.js
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
/**
* Created by drynears on 2/11/15.
*/
$(document).ready(function () {
var $love_words = [
'affection',
'appreciation',
'devotion',
'emotion',
'fondness',
'friendships',
'infatuations',
'passion',
'allegiance',
'adherence',
'dedication',
'deference',
'devotion',
'faithfulness',
'fealty',
'fidelity',
'homage',
'obedience',
'obligation',
'ardor',
'neighborhood',
'people',
'public',
'society',
'love',
'populace',
'residents',
'territory',
'turf',
'calm',
'coolin ',
'syncs',
'table',
'well-adjusted',
'acquaintance',
'affability',
'alliance',
'amity',
'camaraderie',
'brotherhood',
'camaraderie',
'chumminess',
'closeness',
'companionship',
'fellowship',
'esprit de corps',
'comity',
'friendliness',
'friendship',
'generosity',
'goodwill',
'kindness',
'rapport',
'sympathy',
'tolerance',
'altruism',
'amity',
'donation',
'endowment',
'fund',
'philanthropy',
'assistance',
'beneficence',
'contribution',
'dole',
'cooperation',
'aid',
'assistance',
'collaboration',
'participation',
'partnership',
'service',
'unity',
'alliance',
'coalition'
];
function changeWord() {
var item = $love_words[Math.floor(Math.random()*$love_words.length)];
var position = $love_words.indexOf(item);
if(position > -1) {
$love_words.splice(position, 1);
}
console.log(item);
if (item) {
return document.getElementById("word").innerHTML = item;
} else {
return document.getElementById("word").innerHTML = "Game Over!";
}
}
jQuery('#changeForm').submit(function () {
changeWord();
return false;
});
});