add separate sort order field to levels, so they can be reordered without changing the id and invalidating solutions

This commit is contained in:
Crispy 2024-10-07 12:04:55 +02:00
parent 90bc93fa02
commit e43a422708
6 changed files with 27 additions and 11 deletions

View file

@ -236,7 +236,7 @@ fn get_levels() -> Vec<Level> {
levels.push(level);
}
}
levels.sort_by(|a, b| a.id().cmp(b.id()));
levels.sort_by(|a, b| a.sort_order().cmp(&b.sort_order()));
levels
}