-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhome.js
51 lines (46 loc) · 1.23 KB
/
home.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
function initializeGame(name){
localStorage.setItem("Game",name);
switch (name) {
case "tic-tac-toe":
window.location.href= "./tic-tac-toe/tic-tac-toe.html";
break;
case "suduko":
window.location.href= "./suduko/suduko.html";
break;
case "8queens":
window.location.href= "./8queens/8queens.html";
break;
case "connect4":
window.location.href= "./connect4/connect4.html";
break;
case "chess":
window.location.href= "./Chess/chess.html";
break;
case "checkers":
window.location.href= "./checkers/checkers.html";
break;
}
}
function RestartGame(name){
localStorage.setItem("Game",name);
switch (name) {
case "tic-tac-toe":
window.location.href= "./tic-tac-toe.html";
break;
case "suduko":
window.location.href= "./suduko.html";
break;
case "8queens":
window.location.href= "./8queens.html";
break;
case "connect4":
window.location.href= "./connect4.html";
break;
case "chess":
window.location.href= "./chess.html";
break;
case "checkers":
window.location.href= "./checkers.html";
break;
}
}