aoberoi / SwiftUI-Set

CS193P Set game using SwiftUI (Spring 2023)
0 stars 0 forks source link

Make model CustomDebugStringConvertible #21

Open aoberoi opened 7 months ago

aoberoi commented 7 months ago

The Set and Set.Card structs should conform to the CustomStringDebugConvertible protocol. The conformance should probably be in extensions, instead of the initial declarations of the structs.

When describing a Card, the model shouldn't know about the specific visual representation of the card's properties (e.g. that symbol = .first represents a diamond). In order to make debugging output a little clearer, maybe the view model should have its own way to convert the model object into a description that is aware of the visual representation.

Related #12