html
html
1
2
3
4
5
6
7
8
9
10
<!-- Created by Salif Mehmed -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Created by Salif Mehmed */
body {
margin:0;
padding: 0;
}
#t {
margin-top:10px;
border:2px solid #ccc;
border-collapse: collapse;
border-spacing: 0;
}
#t td {
width:16px;
height:16px;
border:1px solid #ddd;
border-radius:2px;
}
Enter to Rename, Shift+Enter to Preview
js
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
/* Created by Salif Mehmed */
var enemy, ally, enemy2;
var missile1, missile2;
var table_rows, table_cells;
var r_random;
var afsh=[];
function f_random(v) {
switch(v) {
case 4:
r_random=Math.floor(Math.random()*6)+1;
return [[4, r_random], [4, r_random+1], [5, r_random], [5, r_random+1]];
break;
case 3:
r_random=Math.floor(Math.random()*6)+7;
return [[11, r_random], [11, r_random+1], [12, r_random]];
break;
case 2:
r_random=Math.floor(Math.random()*4)+4;
return [[2, r_random], [2, r_random+1]];
break;
case "mp":
r_random=Math.floor(Math.random()*2);
return r_random==0?"L":"R";
break;
}
}
function $(v) {
return document.querySelector(v);
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run