2023-09-21 01:09:08 +00:00
|
|
|
part of 'generator.dart';
|
|
|
|
|
|
|
|
class Requirement {
|
2023-09-21 05:00:45 +00:00
|
|
|
final int vxMin, vxMax, vyMin, vyMax;
|
2023-09-21 01:09:08 +00:00
|
|
|
final DirectionSet smooth;
|
|
|
|
|
2023-09-21 05:00:45 +00:00
|
|
|
Requirement(this.vxMin, this.vxMax, this.vyMin, this.vyMax, this.smooth) {
|
|
|
|
assert(vxMin <= vxMax);
|
|
|
|
assert(vyMin <= vyMax);
|
|
|
|
assert(vxMax > 2);
|
|
|
|
assert(vyMax > 2);
|
|
|
|
}
|
2023-09-21 01:09:08 +00:00
|
|
|
|
|
|
|
Requirement flip() {
|
2023-09-21 05:00:45 +00:00
|
|
|
return Requirement(vxMin, vxMax, vyMin, vyMax, smooth.flip());
|
2023-09-21 01:09:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Requirement rotateLeft() {
|
2023-09-21 05:00:45 +00:00
|
|
|
return Requirement(vyMin, vyMax, vxMin, vxMax, smooth.rotateLeft());
|
2023-09-21 01:09:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Requirement rotateRight() {
|
2023-09-21 05:00:45 +00:00
|
|
|
return Requirement(vyMin, vyMax, vxMin, vxMax, smooth.rotateRight());
|
2023-09-21 01:09:08 +00:00
|
|
|
}
|
|
|
|
}
|