Take the 2-minute tour ×  I'm trying to do something simple to
practice my Javascript (which I learned some recently) and I'm
trying to do a game on it (pacman to be precise).  I am trying
to build that game board on the browser by creating images
dynamically. I've done an array like this:  var images= new
Array(25);      images[i]= new Array(25);  And, for the game
board I used a matrix done with 0 and 1's with 25x25 size (not
going to post it here cause is too big and would make my text
hard to read) called board.  For the images that I am using
right now I have something like this:  var image_empty = new
Image();  var image_wall = new Image();  For the initialization
function I have something like this:  function drawField()
if(board[i][j] == 0)             else if(board[i][j] == 1)  And
for drawing the images themselves I am using this:  function
draw(x,y,img)     images[x][y] = new Image(22,22);
images[x][y].src = img.src;     images[x][y].style.position =
'absolute';     images[x][y].sty