From ffa3a0a0f3c1aec11aeec90218b4d47a97046f8d Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 28 Aug 2012 00:13:30 -0400 Subject: [PATCH] Added README describing life-005. --- 005/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 005/README.md diff --git a/005/README.md b/005/README.md new file mode 100644 index 0000000..8df2f33 --- /dev/null +++ b/005/README.md @@ -0,0 +1,14 @@ +life-005 +======== + + +Approach +-------- +AWK's array is not a first class value - it cannot be copied and passed around. +One of approaches to work around this issue (the other I tried in life-004) is +using a single array with a new element for each generation (so that we can +refer to the previous while building new). Problem is that there are no +multidimensional arrays either... However, facilities are provided for +simulating them by storing level dimension information in the key of the +associative array, so I ended up with board[generation, x, y] and manually +deleting a generation when it is no longer needed. -- 2.20.1