Alright, so I am working on a simple card game for Mac OS X. The way I have it set up is with a Card class that holds its own suit and rank, and methods that returns these as NSStrings. What I currently have is a method that pulls random cards out of an array that is the "deck" and puts them into another array that is the player's "hand". I am using NSImages to display the cards onscreen.
What I want to do is call the method in the card that will tell me its suit and rank. Then, I have the image of that card stored elsewhere. Those images are named like 3Diamond.png or JackClub.png, because I was thinking that I could set the image by doing something like this. So basically, I have the rank and the suit in strings, and from that I need to change which UIImage I pick. I realize I could do this with a switch or if else statement but that would be really inefficient.