Added (ugly) random generation avoiding neighbors