Skip to content

Commit

Permalink
again and again and again and again
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Demes committed Oct 27, 2023
1 parent d027da5 commit f12f9b1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,45 @@ public static MapConfig Map1()

return new MapConfig(1, new List<PointConfig>()
{
// 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, DirectionConfig>()
{
{ Direction.Left, new DirectionConfig(0, 8, cost) },
}),
new PointConfig(2, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Bottom, new DirectionConfig(1, 1, cost) },
{ Direction.Left, new DirectionConfig(2, 9, cost) },
}),
new PointConfig(3, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Bottom, new DirectionConfig(3, 2, cost) },
}),
new PointConfig(4, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Right, new DirectionConfig(4, 3, cost) },
{ Direction.Left, new DirectionConfig(5, 5, cost) },
}),
new PointConfig(5, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Bottom, new DirectionConfig(6, 5, cost) },
}),
new PointConfig(6, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Bottom, new DirectionConfig(7, 7, cost) },
{ Direction.Bottom, new DirectionConfig(8, 9, cost) },
}),
new PointConfig(7, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Right, new DirectionConfig(9, 8, cost) },
}),
new PointConfig(8, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Top, new DirectionConfig(10, 9, cost) },
}),
new PointConfig(9, new Dictionary<Direction, DirectionConfig>()
{
{ Direction.Top, new DirectionConfig(11, 4, cost) },
})
});
}
}
2 changes: 1 addition & 1 deletion src/Akka/Akka.Pathfinder/Configs/PointConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public record PointConfig(int PointId, IDictionary<Direction, DirectionConfig> DirectionConfigs);

public record DirectionConfig(int DirectionId, int SourcePointId, int TargetPointId, int Cost);
public record DirectionConfig(int DirectionId, int TargetPointId, int Cost);

public enum Direction
{
Expand Down

0 comments on commit f12f9b1

Please sign in to comment.