Closed yusitnikov closed 1 year ago
The code called Dictionary.Add() without checking that the key is not already present in the dictionary, and it caused an exception when the puzzle has the same constraint twice. Changed it to TryAdd() and added a related unit test.
Dictionary.Add()
TryAdd()
The code called
Dictionary.Add()
without checking that the key is not already present in the dictionary, and it caused an exception when the puzzle has the same constraint twice. Changed it toTryAdd()
and added a related unit test.