Conway game of life OO javascript version