diff --git a/src/lib.rs b/src/lib.rs index ad401c3..387f566 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -148,7 +148,17 @@ fn segments_from_string(string: String) -> Vec { /// e.g. pass all tile IDs into this to get a new non-conflicting tile ID #[inline] fn new_unique_id(ids: Vec) -> String { - "hello".to_string() + let mut new_id: u64 = 0; + + for id in ids { + if new_id != from_base36(&id) { + break; + } + + new_id += 1; + } + + return to_base36(new_id); } pub trait Quote {