Skip to content

Commit

Permalink
MacOS compile fix; Remove PossibleWords dupes
Browse files Browse the repository at this point in the history
  • Loading branch information
williamrjackson committed May 2, 2021
1 parent 195386d commit 82827be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ArduinoSerialCommunication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,6 @@ private string GetFirstPortMatchingName(string contains)
}
return null;
}
}
#endif
}
}
Binary file modified UnityScriptingUtilities.unitypackage
Binary file not shown.
7 changes: 4 additions & 3 deletions WordList.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

namespace Wrj
Expand Down Expand Up @@ -66,15 +67,15 @@ public static List<string> GetPossibleWords(string chars, int minLength = 3)
{
chars = chars.ToLower();
List<string> combinations = CharCombinations(chars.ToLower());
List<string> results = new List<string>();
HashSet<string> results = new HashSet<string>();
foreach (string item in combinations)
{
if (item.Length >= minLength && CheckWord(item))
{
results.Add(item.ToUpper());
}
}
return results;
return results.ToList();
}

/// http://stackoverflow.com/questions/7802822/all-possible-combinations-of-a-list-of-values
Expand Down

0 comments on commit 82827be

Please sign in to comment.