-Changed closed list to HashSet
-Forcing states to override HashCode and Equals(needed for closed list to ensure defined behavior)
-implemented hash code and equals for magicSquareState