In this episode, we plug all the modules together and play the Quiz game for the first time!
As we’re creating questions and answers for the Quiz and connecting all modules together, everything seems fine, until… Bam!
Type [String] does not conform to protocol ‘Equatable’.
We discuss the reason why the foundation
Array type not conforming to
Equatable is a limitation in Swift so far and we consider possible solutions.
We decide to change it to a
Set rather than an
Array since we have already solved the order problem. To do so, we undergo a big refactoring backed up by our tests, which goes smoothly. TDD paid off once again!
Finally, we run the application for the first time and... it works!