Hacker News new | ask | show | jobs
by einaregilsson 3277 days ago
Exactly. Each avatar is made up of 6 features, hair, hair color, skin color, eyes and mouth. No nose, because who needs them! So each part has a code, and I can store a face as a simple 6 character string. Then I just compared against the ids of the eyes, hair and smile. I actually allowed any glasses and any smile because I wasn't absolutely sure which one he'd used :)