js/game.js
//add an object to the DOM
add an object to the DOM
add an object to the DOM
function writeObject(name){
    if (placeObject[name]['type'] == 'image'){
      $('.'+name).append( '<a href=\"#\"><img class=\"image\" src=\"img\/'+placeObject[name]['name']+'.png\"><\/a>' );
    }
    else if (placeObject[name]['type'] == 'letter'){
      $('.'+name).append( '<a href=\"#\"><span class=\"letter\">'+placeObject[name]['name']+'<\/span><\/a>' );
    }
    delete placeObject[name];
  }
function writeObject ( name ) { if ( placeObject [ name ] [ 'type' ] == 'image' ) { $ ( '.' + name ) . append ( '<a href=\"#\"><img class=\"image\" src=\"img\/' + placeObject [ name ] [ 'name' ] + '.png\"><\/a>' ) ; } else if ( placeObject [ name ] [ 'type' ] == 'letter' ) { $ ( '.' + name ) . append ( '<a href=\"#\"><span class=\"letter\">' + placeObject [ name ] [ 'name' ] + '<\/span><\/a>' ) ; } delete placeObject [ name ] ; }
add an object to the DOM
add an object to the DOM
//remove the object from the array to make room for the next cycle