simsim314/LifeAPI — pull request #2 by ceebo (2014-12-16 22:11:41+00:00)
Title: Chris c2

Here are a few more patches. I used std::stringstream and std::string for GetRLE. Memory management is much easier and g++ gives a load of warning about plain char * otherwise. Evolve(after, before, iters) is something I would like to go in. It seems to suit my way of working better. What do you think?

Also I have some ideas for more changes:

1. Rename the four comparison functions as follows so that everything is the same between functions for GlobalState and the rest:

a) Get rid of Contains(main, spark) and AreDisjoint(main, spark) and rename AllOn(main, subset) and AllOff(main, subset) like in the Global case.

b) Rename AreEqual to IsEqual in both cases. I think that the global version AreEqual(pat) with one argument sounds bad so better to rename both. IsEqual(pat1, pat2) sounds ok I think.

2. I think it could be a good idea to move to separate LifeAPI.h and LifeAPI.cpp. I think it would be a very attractive feature for users if LifeAPI.h was a super clean and super concise file that explains 90% of the functionality of LifeAPI without even needing to read the documentaion.

Thoughts?