Fix predictable ports bug

Added a method to check ports that are occupied by the gears
Use Hashset<int>, not List<int>