set neighbors function created for two player mode