adding generateLife to gameOfLife.js