Hi,
I have made a 8*10 LED matrix and I wanted to run game of life on it.
I have tried to use the code from Direct driving of an 8x8 LED matrix by Andrew. I have done all of the needed changes for it to work, but I got stock in this part:
This is the part that deals with the 4 rules. and SIZE = 8
but I have 2 sizes 10 and 8, and I don't know where to put what.
int neighbours(int x, int y) {
return world[(x + 1) % SIZE][y][0] +
world
world[(x + SIZE - 1) % SIZE][y][0] +
world
- [(y + SIZE - 1) % SIZE][0] +
world[(x + 1) % SIZE][(y + 1) % SIZE][0] +
world[(x + SIZE - 1) % SIZE][(y + 1) % SIZE][0] +
world[(x + SIZE - 1) % SIZE][(y + SIZE - 1) % SIZE][0] +
world[(x + 1) % SIZE][(y + SIZE - 1) % SIZE][0];
}
So if some one can help me with that I would be very happy.
Thanks.