( (curpos >= map.width && '.' == map.cells[curpos - map.width])
|| (curpos < map.width * (map.height - 1) && '.' == map.cells[curpos + map.width])
|| (curpos > 0 && '.' == map.cells[curpos - 1] && curpos % map.width != 0)
( (curpos >= map.width && '.' == map.cells[curpos - map.width])
|| (curpos < map.width * (map.height - 1) && '.' == map.cells[curpos + map.width])
|| (curpos > 0 && '.' == map.cells[curpos - 1] && curpos % map.width != 0)