I want to create a DOS style game in Javascript but I cannot get the map to display correctly.
Here is the array in Windows Console:
char Map[1][10][20] = {
"####################",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"####################",
};
And this is what my javascript code is
var Map = {
"#":["#","#","#","#","#","#","#","#","#","#","#","#","#","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#"," "," "," "," "," "," "," "," "," "," "," "," ","#"],
"#":["#","#","#","#","#","#","#","#","#","#","#","#","#","#"]
};
Essentially I want it to output the first array exactly as it appears. I should be able to do everything else.