-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapa.js
35 lines (35 loc) · 4.48 KB
/
mapa.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
var obstacles;
function criaCidade(){
obstacles = {
"0p0":1, "0p1":1, "0p2":1, "0p3":1, "0p4":1, "0p5":1, "0p6":1, "0p7":1, "0p8":1, "0p9":1, "0p10":1, "0p11":1, "0p12":1, "0p13":1, "0p14":1, "0p15":1, "0p16":1, "0p17":1, "0p18":1, "0p19":1,
"1p0":1, "1p1":0, "1p2":0, "1p3":0, "1p4":0, "1p5":0, "1p6":0, "1p7":0, "1p8":0, "1p9":0, "1p10":0, "1p11":0, "1p12":0, "1p13":0, "1p14":0, "1p15":0, "1p16":0, "1p17":0, "1p18":0, "1p19":1,
"2p0":1, "2p1":0, "2p2":1, "2p3":1, "2p4":1, "2p5":1, "2p6":1, "2p7":0, "2p8":1, "2p9":1, "2p10":1, "2p11":1, "2p12":1, "2p13":0, "2p14":1, "2p15":1, "2p16":1, "2p17":1, "2p18":0, "2p19":1,
"3p0":1, "3p1":0, "3p2":1, "3p3":1, "3p4":1, "3p5":1, "3p6":1, "3p7":0, "3p8":1, "3p9":1, "3p10":1, "3p11":1, "3p12":1, "3p13":0, "3p14":1, "3p15":1, "3p16":1, "3p17":1, "3p18":0, "3p19":1,
"4p0":1, "4p1":0, "4p2":1, "4p3":1, "4p4":1, "4p5":1, "4p6":1, "4p7":0, "4p8":1, "4p9":1, "4p10":1, "4p11":1, "4p12":1, "4p13":0, "4p14":1, "4p15":1, "4p16":1, "4p17":1, "4p18":0, "4p19":1,
"5p0":1, "5p1":0, "5p2":1, "5p3":1, "5p4":1, "5p5":1, "5p6":1, "5p7":0, "5p8":1, "5p9":1, "5p10":1, "5p11":1, "5p12":1, "5p13":0, "5p14":1, "5p15":1, "5p16":1, "5p17":1, "5p18":0, "5p19":1,
"6p0":1, "6p1":0, "6p2":1, "6p3":1, "6p4":1, "6p5":1, "6p6":1, "6p7":0, "6p8":1, "6p9":1, "6p10":1, "6p11":1, "6p12":1, "6p13":0, "6p14":1, "6p15":1, "6p16":1, "6p17":1, "6p18":0, "6p19":1,
"7p0":1, "7p1":0, "7p2":0, "7p3":0, "7p4":0, "7p5":0, "7p6":0, "7p7":0, "7p8":0, "7p9":0, "7p10":0, "7p11":0, "7p12":0, "7p13":0, "7p14":0, "7p15":0, "7p16":0, "7p17":0, "7p18":0, "7p19":1,
"8p0":1, "8p1":0, "8p2":1, "8p3":1, "8p4":1, "8p5":1, "8p6":1, "8p7":0, "8p8":1, "8p9":1, "8p10":1, "8p11":1, "8p12":1, "8p13":0, "8p14":1, "8p15":1, "8p16":1, "8p17":1, "8p18":0, "8p19":1,
"9p0":1, "9p1":0, "9p2":1, "9p3":1, "9p4":1, "9p5":1, "9p6":1, "9p7":0, "9p8":1, "9p9":1, "9p10":1, "9p11":1, "9p12":1, "9p13":0, "9p14":1, "9p15":1, "9p16":1, "9p17":1, "9p18":0, "9p19":1,
"10p0":1, "10p1":0, "10p2":1, "10p3":1, "10p4":1, "10p5":1, "10p6":1, "10p7":0, "10p8":1, "10p9":1, "10p10":1, "10p11":1, "10p12":1, "10p13":0, "10p14":1, "10p15":1, "10p16":1, "10p17":1, "10p18":0, "10p19":1,
"11p0":1, "11p1":0, "11p2":1, "11p3":1, "11p4":1, "11p5":1, "11p6":1, "11p7":0, "11p8":1, "11p9":1, "11p10":1, "11p11":1, "11p12":1, "11p13":0, "11p14":1, "11p15":1, "11p16":1, "11p17":1, "11p18":0, "11p19":1,
"12p0":1, "12p1":0, "12p2":0, "12p3":0, "12p4":0, "12p5":0, "12p6":0, "12p7":0, "12p8":0, "12p9":0, "12p10":0, "12p11":0, "12p12":0, "12p13":0, "12p14":0, "12p15":0, "12p16":0, "12p17":0, "12p18":0, "12p19":1,
"13p0":1, "13p1":0, "13p2":1, "13p3":1, "13p4":1, "13p5":1, "13p6":1, "13p7":0, "13p8":1, "13p9":1, "13p10":1, "13p11":1, "13p12":1, "13p13":0, "13p14":1, "13p15":1, "13p16":1, "13p17":1, "13p18":0, "13p19":1,
"14p0":1, "14p1":0, "14p2":1, "14p3":1, "14p4":1, "14p5":1, "14p6":1, "14p7":0, "14p8":1, "14p9":1, "14p10":1, "14p11":1, "14p12":1, "14p13":0, "14p14":1, "14p15":1, "14p16":1, "14p17":1, "14p18":0, "14p19":1,
"15p0":1, "15p1":0, "15p2":1, "15p3":1, "15p4":1, "15p5":1, "15p6":1, "15p7":0, "15p8":1, "15p9":1, "15p10":1, "15p11":1, "15p12":1, "15p13":0, "15p14":1, "15p15":1, "15p16":1, "15p17":1, "15p18":0, "15p19":1,
"16p0":1, "16p1":0, "16p2":1, "16p3":1, "16p4":1, "16p5":1, "16p6":1, "16p7":0, "16p8":1, "16p9":1, "16p10":1, "16p11":1, "16p12":1, "16p13":0, "16p14":1, "16p15":1, "16p16":1, "16p17":1, "16p18":0, "16p19":1,
"17p0":1, "17p1":0, "17p2":1, "17p3":1, "17p4":1, "17p5":1, "17p6":1, "17p7":0, "17p8":1, "17p9":1, "17p10":1, "17p11":1, "17p12":1, "17p13":0, "17p14":1, "17p15":1, "17p16":1, "17p17":1, "17p18":0, "17p19":1,
"18p0":1, "18p1":0, "18p2":0, "18p3":0, "18p4":0, "18p5":0, "18p6":0, "18p7":0, "18p8":0, "18p9":0, "18p10":0, "18p11":0, "18p12":0, "18p13":0, "18p14":0, "18p15":0, "18p16":0, "18p17":0, "18p18":0, "18p19":1,
"19p0":1, "19p1":1, "19p2":1, "19p3":1, "19p4":1, "19p5":1, "19p6":1, "19p7":1, "19p8":1, "19p9":1, "19p10":1, "19p11":1, "19p12":1, "19p13":1, "19p14":1, "19p15":1, "19p16":1, "19p17":1, "19p18":1, "19p19":1,
};
var label = "";
for(var x=0;x<20;x++) {
for(var y=0;y<20;y++) {
//label = x+","+y;
if(obstacles[x+"p"+y] != 0)
$("#box").append("<div class='parede' id='"+x+"p"+y+"'>"+"</div>");
else
$("#box").append("<div class='quadrado' id='"+x+"p"+y+"'>"+label+"</div>");
}
}
}