Problem of the Day
A new programming or logic puzzle every Mon-Fri

Next Life

Welcome back!

Today's problem is to create a function that returns the next iteration of Conway's Game of Life. The link goes straight to the rules if you're unfamilar with the game. For today's problem we'll assume that 1 = alive cell and 0 = dead cell.

var generation = [
    "111",
    "110",
    "100"
];
next_life(generation)

//Answer = ["101", "001", "110"]

Permalink: http://problemotd.com/problem/next-life/

Comments:

  • There are currently no comments. You can be first!

Content curated by @MaxBurstein