-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.js
21 lines (17 loc) · 882 Bytes
/
init.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function G(id) {
return document.getElementById(id);
}
document.addEventListener('DOMContentLoaded', function () {
startNewGame(-1);
G("newEasyGameButton").addEventListener('click', function(){startNewGame(0)});
G("newMedGameButton").addEventListener('click', function(){startNewGame(1)});
G("newLargeGameButton").addEventListener('click', function(){startNewGame(2)});
G("pauseGameImg").addEventListener('click', function(){setRun(!run)});
G("scoreGameImg").addEventListener('click', showScoreBoard);
G("board").ondragstart = function () {return false};
G("pauseScreen").ondragstart = function () {return false};
G("scoreBoard").ondragstart = function () {return false};
G("board").oncontextmenu = function () {return false};
G("pauseScreen").oncontextmenu= function () {return false};
G("scoreBoard").oncontextmenu= function () {return false};
});