Move valid_residents to the scheduler impl and simplify it

This commit is contained in:
2026-01-14 21:15:57 +02:00
parent 2febcb7344
commit 1ce55675db
4 changed files with 63 additions and 118 deletions

View File

@@ -77,6 +77,18 @@ impl Slot {
self.day.greater_than(&Day(limit))
}
pub fn other_position(&self) -> Self {
let other_pos = match self.position {
ShiftPosition::First => ShiftPosition::Second,
ShiftPosition::Second => ShiftPosition::First,
};
Self {
day: self.day,
position: other_pos,
}
}
pub fn default() -> Self {
Self {
day: Day(1),