Wednesday, December 21, 2011

I Made It Out of C++

Today is the first day of Hanukkah, the Jewish "festival of lights." The eight-day winter holiday celebrates historic miracles and includes the lighting of a nine-candeled hanukkiah (or menorah, as it is often and erroneously now called). This is one of my holidays, albeit a relatively minor one in my religion. But then, should it have surprised me when one of my international residents asked me if Jews celebrated Christmas?

My favorite dreidel and quintessential Israeli memento, this tiny top bears not a shin, but a pey, reading "A great miracle happened here."
After all, it would appear that everyone in America does; it is a national holiday (in violation of the establishment clause, anyone?). Of course, this came within days of a relative asking me if Muslims do, so that either makes me the religion expert (nope, haven't read my Koran yet), or the the only one who's heard of Google. But no, only Christians celebrate Christmas. That's not to say that the rest of us don't like joining in on the fun; I love to experience friends' cultures and celebrations. But that is to say that while the rest of the country counts down to Sunday, we Jews will have been counting up the eight nights.

In celebration, Jews typically play dreidel on Hanukkah. We take a dreidel (a four-sided top), and spin it, gambling gelt (chocolate coins). One of my favorite winter memories here on campus was playing dreidel with a group of students with diverse religious backgrounds, using both gelt and candy canes (associated with Christmas).

Hanukkah and Christmas 2010

This year, to study for my computer science final, I decided to code up a game of dreidel. There aren't any graphics, and the interface isn't much, but the game logic works really well. Plus, you can add or remove players mid-game (I was studying, after all; I had to include dynamic arrays) as your friends drop by to see what you're doing.

Maybe I'll put in some cheat-codes. "Sov, sov sov"?

Much like the text-based adventure games of the 1980s, my program takes in the commands "add" and "spin" to welcome players and give the dreidel a whirl. Dreidel has some hidden rules you might not think about until you code it, like watching out for an empty pot or splitting an odd number of gelt in half. The program works though, although, when I show it off to friends, it does like to eliminate me first.

Happy Hanukkah, everyone! Candle-lighting times are featured this week in the Peacelight holiday header.

No comments:

Post a Comment

Have something to say? Add to the conversation!