From b1c40fc8e6f0c068b5e3070605ee58fe22b16d80 Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Sat, 6 Jun 2015 19:48:42 -0400 Subject: [PATCH] Functional CAM generator --- src/cam_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cam_parser.py b/src/cam_parser.py index f04c881..76e70a4 100644 --- a/src/cam_parser.py +++ b/src/cam_parser.py @@ -99,7 +99,7 @@ class CAMParser: """ x, y = list(map(int, x)), list(map(int, y)) def next_state(plane, neighborhood, *args): - if plane.grid.flat[neighborhood.flat_index]: + if plane.grid.flat[neighborhood.flat_index][neighborhood.bit_index]: return int(neighborhood.total in x) else: return int(neighborhood.total in y)