Extracted functions for finding neighbours and agent types

This allows an 'board state' to be extracted which will contain the
current agents at each point.