From f12f9b11699147c3800cd793a84b8f86652d3e86 Mon Sep 17 00:00:00 2001 From: Patrick Demes Date: Fri, 27 Oct 2023 14:47:39 +0200 Subject: [PATCH] again and again and again and again --- .../InitialData/MapProvider.cs | 48 +++++++++++++++---- .../Akka.Pathfinder/Configs/PointConfig.cs | 2 +- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/Akka/Akka.Pathfinder.AcceptanceTests/InitialData/MapProvider.cs b/src/Akka/Akka.Pathfinder.AcceptanceTests/InitialData/MapProvider.cs index e9b89df..01b2864 100644 --- a/src/Akka/Akka.Pathfinder.AcceptanceTests/InitialData/MapProvider.cs +++ b/src/Akka/Akka.Pathfinder.AcceptanceTests/InitialData/MapProvider.cs @@ -10,15 +10,45 @@ public static MapConfig Map1() return new MapConfig(1, new List() { - // new PointConfig(1, 0, 0, 8, 0, cost), - // new PointConfig(2, 0, 1, 9, 0, cost), - // new PointConfig(3, 0, 2, 0, 0, cost), - // new PointConfig(4, 0, 0, 3, 5, cost), - // new PointConfig(5, 0, 6, 0, 0, cost), - // new PointConfig(6, 0, 7, 0, 9, cost), - // new PointConfig(7, 0, 0, 0, 8, cost), - // new PointConfig(8, 9, 0, 0, 0, cost), - // new PointConfig(9, 4, 0, 0, 0, cost), + new PointConfig(1, new Dictionary() + { + { Direction.Left, new DirectionConfig(0, 8, cost) }, + }), + new PointConfig(2, new Dictionary() + { + { Direction.Bottom, new DirectionConfig(1, 1, cost) }, + { Direction.Left, new DirectionConfig(2, 9, cost) }, + }), + new PointConfig(3, new Dictionary() + { + { Direction.Bottom, new DirectionConfig(3, 2, cost) }, + }), + new PointConfig(4, new Dictionary() + { + { Direction.Right, new DirectionConfig(4, 3, cost) }, + { Direction.Left, new DirectionConfig(5, 5, cost) }, + }), + new PointConfig(5, new Dictionary() + { + { Direction.Bottom, new DirectionConfig(6, 5, cost) }, + }), + new PointConfig(6, new Dictionary() + { + { Direction.Bottom, new DirectionConfig(7, 7, cost) }, + { Direction.Bottom, new DirectionConfig(8, 9, cost) }, + }), + new PointConfig(7, new Dictionary() + { + { Direction.Right, new DirectionConfig(9, 8, cost) }, + }), + new PointConfig(8, new Dictionary() + { + { Direction.Top, new DirectionConfig(10, 9, cost) }, + }), + new PointConfig(9, new Dictionary() + { + { Direction.Top, new DirectionConfig(11, 4, cost) }, + }) }); } } \ No newline at end of file diff --git a/src/Akka/Akka.Pathfinder/Configs/PointConfig.cs b/src/Akka/Akka.Pathfinder/Configs/PointConfig.cs index 2d4307a..94994cc 100644 --- a/src/Akka/Akka.Pathfinder/Configs/PointConfig.cs +++ b/src/Akka/Akka.Pathfinder/Configs/PointConfig.cs @@ -2,7 +2,7 @@ public record PointConfig(int PointId, IDictionary DirectionConfigs); -public record DirectionConfig(int DirectionId, int SourcePointId, int TargetPointId, int Cost); +public record DirectionConfig(int DirectionId, int TargetPointId, int Cost); public enum Direction {