Skip to content

Commit

Permalink
Fixes nasty bug that caused connection ports to shift.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLautzenheiser committed Jun 1, 2015
1 parent ba6138a commit 918ae93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion CompassPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ namespace Trizbort
/// </summary>
public enum CompassPoint
{
None,
North,
NorthNorthEast,
NorthEast,
Expand Down
6 changes: 3 additions & 3 deletions Room.cs
Original file line number Diff line number Diff line change
Expand Up @@ -945,10 +945,10 @@ public void Load(XmlElementReader element)

public List<Connection> GetConnections()
{
return GetConnections(CompassPoint.None);
return GetConnections(null);
}

public List<Connection> GetConnections(CompassPoint compassPoint)
public List<Connection> GetConnections(CompassPoint? compassPoint)
{
var connections = new List<Connection>();

Expand All @@ -964,7 +964,7 @@ public List<Connection> GetConnections(CompassPoint compassPoint)

var compassPort = (CompassPort) vertex.Port;

if (compassPoint == CompassPoint.None)
if (compassPoint == null)
connections.Add(connection);
else
if (compassPort.CompassPoint == compassPoint)
Expand Down

0 comments on commit 918ae93

Please sign in to comment.