This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Life do | |
def run(board) when is_binary(board) do | |
board |> parse_board |> run | |
end | |
def run(board) do | |
IO.write("\e[H\e[2J") | |
Life.print_board board | |
:timer.sleep 1000 | |
board = next_board(board) |