Open alexdriedger opened 2 years ago
This depends on the exact definition of equality. In the current code base, there are many checks for equality which are only seeing if two objects are actually the same object (meaning that they making the same memory reference).
If equality of the health, stats, status, etc. is desired, would it be possible to check if their string representations are identical?
The compress / decompress methods provide good ways to check for equality. However, in situations where the objects do not need to be compressed (eg. unit tests), equality methods are an easier way to check for equality. Additionally, this allows
==
to be used on these objects, which is probably more accessible to newer developers using the library