This shows the transition from the old isSetWithCards:: method to the new one. The reason for the change is pretty obvious, as the algorithm for checking each card property is the same, yet was repeated in the old code for every property.
The change probably took all of 10 minutes, if that, but I find it much cleaner since I'm not repeating the same code like I was in the old one. I also updated the comments to make a little more sense. "Two different, one same" wasn't quite descriptive enough for me.
Note that I can't simply return YES when I find that a property passes the test. All properties have to pass before I know the set it valid, so checking for truth didn't make sense here. If any property doesn't pass, I know the set isn't valid, so I can safely return NO when I find it doesn't pass.
Daily Literature Deviations is a group that is dedicated to bringing literature to the forefront of the deviantArt community. We attempt to accomplish this by daily featuring Literature artists from around the community that deserve the recognition, but are not getting it.
Each day we will feature 5 deviations from the Literature categories in a News Article. In order to support the artists that we feature, we ask that you the news article as well as check out the individual pieces. We understand that each day you may not be able to check out each and every one of the pieces, everyone has their own things going on. We just ask that you make an attempt to help support the growing Literature community.
Although `DEVlANT joined our community only a year ago, he's made sure to make his mark in as many ways as possible. From extensive bug testing around the site, to heading up the now infamous #devBUG Group, Martin's always eager to get involved. His inquisitive mind and enthusiastic personality is reflected in every part of the community which he reaches out to. Always eager to bring suggestions and feedback to us in a positive way, `DEVlANT shows a maturity way beyond his years. It's with great pleasure that we award very first Deviousness of 2010 t... Read More
Comments