Wednesday, 18 September 2013

c++ : game of life?

c++ : game of life?

i am asked to create a base class named Cell from which two are derived a
ConwayCell and FredkinCell. i'm having a problem implementing a function
that calculates the number of alive neighboring cells given that the only
member variable is a character cell ( ' * ' or ' . ' ) provided with a
bool function that determines whether a cell is alive or dead respectively
and a function that prints the cell. is there a way to implement that
function without using an array?(c++ beginner) this is a class that
defines the behaiviour of a single cell.

No comments:

Post a Comment