Skip to content

Commit

Permalink
Code cleanup. Moved BearingOfLine function to Direction, and ensured …
Browse files Browse the repository at this point in the history
…that it takes into account the YIncreasesUpwards flag appropriately. This fixes issue #5.  Updated documentation.
  • Loading branch information
Chris3606 committed Jan 26, 2018
1 parent 01e5066 commit a6aeb54
Show file tree
Hide file tree
Showing 83 changed files with 679 additions and 625 deletions.
6 changes: 3 additions & 3 deletions GoRogue-PerformanceTests/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
</configuration>
</configuration>
2 changes: 2 additions & 0 deletions GoRogue-PerformanceTests/GoRogue-PerformanceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>RECS0145;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -31,6 +32,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>RECS0145;</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion GoRogue-PerformanceTests/PathingTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GoRogue;
using Generators = GoRogue.MapGeneration.Generators;
using GoRogue.Pathing;
using System;
using System.Diagnostics;
using Generators = GoRogue.MapGeneration.Generators;

namespace GoRogue_PerformanceTests
{
Expand Down
2 changes: 0 additions & 2 deletions GoRogue-PerformanceTests/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using GoRogue;
using GoRogue.MapGeneration;
using GoRogue.SenseMapping;
using System;

Expand Down Expand Up @@ -59,7 +58,6 @@ private static void Main()
Console.WriteLine($"Time for {ITERATIONS_FOR_TIMING} paths of Jump Point Search, on {MAP_WIDTH}x{MAP_HEIGHT} map:");
Console.WriteLine($"\t{timeJumpPoint}");
*/

}
}
}
3 changes: 1 addition & 2 deletions GoRogue-PerformanceTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down Expand Up @@ -33,4 +32,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
7 changes: 4 additions & 3 deletions GoRogue-UnitTests/EffectTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using GoRogue;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using GoRogue;
using System;

namespace GoRogue_UnitTests
{
Expand All @@ -23,6 +23,7 @@ protected override void OnTrigger(EffectArgs e)
e.CancelTrigger = true;
}
}

[TestClass]
public class EffectTests
{
Expand Down Expand Up @@ -125,4 +126,4 @@ public void EffectTriggerEffects()
Assert.AreEqual(1, secEffectTrigger.Effects[0].Duration); // Must have cancelled
}
}
}
}
2 changes: 2 additions & 0 deletions GoRogue-UnitTests/GoRogue-UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>RECS0145;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -37,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>RECS0145;</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down
2 changes: 1 addition & 1 deletion GoRogue-UnitTests/MapAreaTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GoRogue;
using GoRogue.MapGeneration;
using Generators = GoRogue.MapGeneration.Generators;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Generators = GoRogue.MapGeneration.Generators;

namespace GoRogue_UnitTests
{
Expand Down
2 changes: 1 addition & 1 deletion GoRogue-UnitTests/MapGenTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using GoRogue;
using GoRogue.MapGeneration;
using Generators = GoRogue.MapGeneration.Generators;
using GoRogue.Random;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Generators = GoRogue.MapGeneration.Generators;

namespace GoRogue_UnitTests
{
Expand Down
3 changes: 1 addition & 2 deletions GoRogue-UnitTests/MathHelperTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using GoRogue;
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace GoRogue_UnitTests
Expand All @@ -23,4 +22,4 @@ public void RoundToMultiple()
Assert.AreEqual(0, result);
}
}
}
}
6 changes: 3 additions & 3 deletions GoRogue-UnitTests/MultiSpatialMapTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using GoRogue;
using GoRogue;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace GoRogue_UnitTests
{
Expand Down Expand Up @@ -153,4 +153,4 @@ public void MultiSpatialMapRemove()
Assert.AreEqual(0, count);
}
}
}
}
5 changes: 1 addition & 4 deletions GoRogue-UnitTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("GoRogue-UnitTests")]
Expand All @@ -10,11 +9,9 @@
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]

[assembly: Guid("d421d454-9249-48cf-9f19-d17690615019")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
8 changes: 4 additions & 4 deletions GoRogue-UnitTests/RadiusFOVSyncTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using GoRogue;
using Generators = GoRogue.MapGeneration.Generators;
using GoRogue;
using GoRogue.SenseMapping;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Generators = GoRogue.MapGeneration.Generators;

namespace GoRogue_UnitTests
{
Expand Down Expand Up @@ -178,4 +178,4 @@ private void printArray(bool[,] arr)
}
}
}
}
}
4 changes: 2 additions & 2 deletions GoRogue-UnitTests/SpatialMapTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GoRogue_UnitTests
{
class MyIDImpl : IHasID
internal class MyIDImpl : IHasID
{
private static IDGenerator idGen = new IDGenerator();
public uint ID { get; private set; }
Expand Down Expand Up @@ -156,4 +156,4 @@ public void SpatialMapRemove()
Assert.AreEqual(0, count);
}
}
}
}
1 change: 1 addition & 0 deletions GoRogue/ArrayMapOf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class ArrayMapOf<T> : ISettableMapOf<T>, ICloneable
/// The width of the array.
/// </summary>
public int Width { get => array.GetLength(0); }

/// <summary>
/// The height of the array.
/// </summary>
Expand Down
Loading

0 comments on commit a6aeb54

Please sign in to comment.