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