public void Regression1() { var report = new TestReport(); var defaultPuzzle = Puzzle.Builder.DefaultTestPuzzle(); // default puzzle var analysis = new PuzzleAnalysis(defaultPuzzle); var state = analysis.Evalute(defaultPuzzle); var pushMap = PushMap.Find(state, new VectorInt2(3, 3), defaultPuzzle.Player.Position); report.WriteLine("==================="); report.WriteLine(defaultPuzzle); report.WriteLine(pushMap); report.WriteLine("==================="); var r = pushMap.FindPlayerWalkRoute(new VectorInt2(7, 3)); report.WriteLine(r); Assert.Equal(new TestReport(@"=================== #~~###~~~~# ~~##.#~#### ~##..###..# ##.X......# #...PX.#..# ###.X###..# ~~#..#OO..# ~##.##O#.## ~#......##~ ~#.....##~~ ########~~~ ........... ....X...... ...XX...XX. ..XXXXXXXX. .XXXX...XX. ...X....XX. ...X..XXXX. ...X..X.X.. ..XXXXXX... ..XXXXX.... ........... =================== LLURRRR "), report); }
public override void Init(Puzzle puzzle) { base.Init(puzzle); Analysis = new PuzzleAnalysis(Start); InitElements(); }