added "toArray" method for puzzle, in order to do comparisons to closed
states for search