| 123456789101112131415161718192021222324252627282930313233 |
- namespace Day17;
- public class UltraPath : Path
- {
- public UltraPath(Path? prev, Tile tile, Vec vRun)
- : base(prev, tile, vRun)
- {
- }
-
- public override IEnumerable<Vec> Next()
- {
- if (LRun < 4)
- {
- yield return VRun;
- }
- else if (LRun < 10)
- {
- yield return VRun.RotatePositive();
- yield return VRun;
- yield return VRun.RotateNegative();
- }
- else
- {
- yield return VRun.RotatePositive();
- yield return VRun.RotateNegative();
- }
- }
-
- public override bool CanStop()
- {
- return LRun >= 4;
- }
- }
|