
please wait
|
|
is_live()
the =
operator is used instead of ==
. Also the function should return a default value if nether of these conditions are true._neighbors()
at line 51 a new array is created, char c[_rows][_columns] = {0};
in the local scope. This cannot work in this context as the returned value of count will always be the same. I think there should be an array of cells rather than an array of characters, and it should be created at a higher level, presumably as part of the class Life
or one of its derived classes.ConwayLife
and FredkinLife
inherit from class Life
? Also those two classes surely should make use of the ConwayCell
and FredkinCell
classes.