// Exercise 04.01 - Booleans - Conditions // // Aim: Write a condition with a boolean result // // Conway's game of life is a 2d-cellular automaton that has the following rule: // A cell is either dead (0) or alife (255). In each timestep a cell becomes or stays alife // if it has three neighbors. A living cell stays alife if it has two neighbors. // Fill in the condition alife that should be true if the cell will be alife in the next // timestep. // newImage("gol", "8-bit black", 300, 300, 20); // Create a new image stack run("Salt and Pepper", "slice"); // Set binary pixel values (0 and 255) randomly run("Salt and Pepper", "slice"); run("In [+]"); // Zoom in run("In [+]"); run("In [+]"); width = getWidth(); // Get the width and height of the image height = getHeight(); for (z=0; z