Refactor isEqual on cards