Try matix solution.
bool life[] = new bool[] {false, false, true, true, false, false, false, false, false}; bool die[] = new bool[] {true, true, false, false, true, true, true, true, true}; bool alive[] = new bool[] {false, false, false, true, false, false, false, false, false}; bool shouldLife=live[count]; bool shouldDie=die[count]; bool getAlive=alive[count];
source share