Hey :)) (btw I'm german sry for my englisch)
I have to do a project for school, and I'm programming "Conway's Game Of Life" and I'm almost done but theres one problem...
So I have the variables x and y who represent coordinates of certain fields (x/y). I want to have acces of the field before, and one field above of the the actual field (x/y), so the field (x-1/y+1).
In an If-Else Expression I wanna "ask" if on the field (x-1/y+1) is an object (in my case it's "lebendigeZelle" a german expression), but I don't know how i can write that???
I wrote it that way but just as a kind of wildcard:
How do I have to change the condition that the program works??
Anyone an idea?
Thanks :)
if(i - 1,j + 1 = lebendigeZelle)
{
neighbours = neighbours + 1;
}
else
{
}

