private MapObject[] getNearObjects(int x, int y)
	{
		MapObject[] nearObjects = new MapObject[4];

		nearObjects[0] = x < grid.length-1 ? grid[x+1][y].getObject() : null;
		nearObjects[1] = x > 0 ? grid[x-1][y].getObject() : null;
		nearObjects[2] = y > 0 ? grid[x][y-1].getObject() : null;
		nearObjects[3] = y < grid[x].length-1 ? grid[x][y+1].getObject() : null;

		return nearObjects;
	}