matterbridge-roborock-vacuum-plugin
Version:
Matterbridge Roborock Vacuum Plugin
19 lines (16 loc) • 351 B
text/typescript
export class Sequence {
private readonly min: number;
private readonly max: number;
private current: number;
constructor(min: number, max: number) {
this.min = min;
this.max = max;
this.current = min;
}
next(): number {
if (this.current > this.max) {
this.current = this.min;
}
return this.current++;
}
}