-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.js
57 lines (40 loc) · 1.52 KB
/
app.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
import { renderMonsters } from './src/render-monsters.js';
import { bingoCheck } from './src/bingo.js';
import { displayMonster } from './src/display-monster.js';
renderMonsters();
const newPick = document.getElementById('new-pick');
const playAgain = document.getElementById('play-again');
const bingoButton = document.getElementById('bingo');
const startButton = document.getElementById('start');
const intro = document.getElementById('intro');
const gridContainer = document.getElementById('grid-container');
const flyingMonster = document.getElementById('flying-monster');
const tipsyMonster = document.getElementById('tipsy-monster');
function hideUnhide() {
newPick.classList.remove('hidden');
gridContainer.classList.remove('hidden');
bingoButton.classList.remove('hidden');
startButton.classList.add('hidden');
intro.classList.add('hidden');
displayMonster();
}
startButton.addEventListener('click', () => {
flyingMonster.classList.remove('hidden');
flyingMonster.classList.add('flying-monsters');
tipsyMonster.classList.remove('hidden');
tipsyMonster.classList.add('tipsy-monsters');
setTimeout(hideUnhide, 5000);
});
newPick.addEventListener('click', ()=>{
displayMonster();
});
playAgain.addEventListener('click', ()=>{
window.location.reload();
//re -render monsters, creating anew bingo card
//import h, and re-set it to an empty array
//let = gamesWon
//if bingo = true, gamesWom++
});
bingoButton.addEventListener('click', () => {
bingoCheck();
});