Skip to content

Commit

Permalink
remove dependency and fix a small bug.
Browse files Browse the repository at this point in the history
Throw error
  • Loading branch information
LoneWandererProductions committed Dec 4, 2023
1 parent a171fe5 commit 549df06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 2 additions & 5 deletions PathFinding/PathFinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Debugger;

namespace PathFinding
{
Expand Down Expand Up @@ -185,14 +184,12 @@ private static IEnumerable<PathNode> FindPath(MovePoint start, MovePoint end, bo
////bail should not happen if files are loaded correct, if we load a wrong map, this might actual be possible, but we should still catch it
if (end.Xrow > (_length * 3) - 2)
{
DebugLog.CreateLogFile(string.Concat(PathResources.ErrorLength, _height), ErCode.Error);
return null;
throw new Exception(string.Concat(PathResources.ErrorLength, _length));
}

if (end.Ycolumn > (_height * 3) - 2)
{
DebugLog.CreateLogFile(string.Concat(PathResources.ErrorHeight, _height), ErCode.Error);
return null;
throw new Exception(string.Concat(PathResources.ErrorHeight, _height));
}

current = _gridArray[end.Xrow, end.Ycolumn]; //Current = end designation node
Expand Down
4 changes: 0 additions & 4 deletions PathFinding/PathFinding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@
<Authors>Wayfarer</Authors>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Debugger\Debugger.csproj" />
</ItemGroup>

</Project>

0 comments on commit 549df06

Please sign in to comment.