It sounds like you wish to have the world evolve in the same manner every time like Conway's life. In Life, you look at each cell and calculate what the outcome for it would be based on the previous state. If the cell has two neighbors it will live to the next generation, no matter if those neighbors won't be there in the next generation. The original state should be read-only and the rules should work no matter what.
For instance, what if you have two wolves near a sheep, would they both eat it, or just one? If just one, then you need a rule for which one gets to eat the sheep and the other one needs to know that. You could go the opposite way, i.e. look at the sheep, find pick an animal that would eat it. Let's say that you only want one wolf to eat the sheep and you say that the wolf with the lowest 'Y' coordinate gets the sheep, or the lowest 'X' coordinate if there are two wolves with the same 'Y'. If you are processing a wolf you need to make sure there is no other wolf that would eat the sheep first. This could get more confusing because maybe that would has another sheep near it that it would eat, so it wouldn't eat the first one...
The easiest way would be to say that all animals can do their actions no matter what happens to them in the evolution to the next round or what any other animal does. If a sheep is surrounded by three wolves, it will be dead the next round and all wolves will share in the meal. If there is grass next to a sheep, the sheep will eat it even if the sheep is surrounded by wolves. For the wolves, they will all be fed that round because they were next to a sheep.
public class Cell {
public int CellType = 0; // 0 == empty, 1 == grass, 2 == sheep, 3 == wolf
public int Feedings = 0;
}
public class World {
public Cell [] Cells = new Cell[100];
public int Rows = 10, Cols = 10;
public Cell GetCell(x, y) {
if (x < 0 || x >= Cols || y < 0 || y >= Rows) return null;
if (Cells[y * Cols + x] == null) {
Cells[y * Cols + x] = new Cell();
}
return Cells[y * Cols + x];
}
public World Evolve() {
World w = new World();
for (int y = 0; y < Rows; y++) {
for (int x = 0; x < Cols; x++) {
HandleCell(w, x, y);
}
}
return w;
}
public void HandleCell(World newWorld, int x, int y) {
Cell result = newWorld.GetCell(x, y);
Cell c = GetCell(x, y);
if (c.CellType == 2) { // sheep
bool foundWolf = false;
bool foundGrass = false;
// code here to find if a wolf or grass are around the sheep
if (foundWolf) {
// default cell type is empty, so leave it be (wolf ate me)
} else {
result.cellType = 2; // still a sheep here
if (foundGrass) {
result.Feedings = c.Feedings + 1; // and he ate!
} else {
result.Feedings = c.Feedings; // or not...
}
}
}
if (c.CellType == 3) { // wolf
bool foundSheep = false;
// code here to find if a sheep is around the wolf
result.CellType = 3;
if (foundSheep) {
result.Feedings = c.Feedings + 1; // ate the sheep!
} else {
result.Feedings = c.Feedings;
}
}
}