Added function for finding alive and dead neighbours.