js/main.js
// add a new zombie to zombieArray

add a new zombie to zombieArray
add a new zombie to zombieArray
function zombieVisit() {
  for (i = 0; i < zombieArray.length; i++) {
    var rand = Math.floor(Math.random() * houseArray.length);
    if (houseArray[rand] == "uninfected") {
      houseArray.splice(rand, 1, "infected");
      zombieArray.push(1);
    }
  }
  runGame();
}
function zombieVisit ( ) { for ( i = 0 ; i < zombieArray . length ; i ++ ) { var rand = Math . floor ( Math . random ( ) * houseArray . length ) ; if ( houseArray [ rand ] == "uninfected" ) { houseArray . splice ( rand , 1 , "infected" ) ; zombieArray . push ( 1 ) ; } } runGame ( ) ; }
add a new zombie to zombieArray
add a new zombie to zombieArray