test cases for neighbour checking
implementation of state transition