I'd been thinking about if for a while but at last I got around to something a little fun: a freecell game. I was going to do it in C++, but... Python is so frickin EASY! Plus, the class inheritance system is a really nice advantage with this kind of thing. Here's what I have so far.
http://pastebin.com/NiH02qE9
The mechanics of freecell are really quite simple and almost trivial to write, so it didn't really take me long to write the move functions (no longer than it took me to write out all of those card name variables, etc...). All that really remains, besides bug testing, is fleshing out how it's all displayed. In the beginning, unfortunately, it'll be all text-based... but hopefully I can get something that's decent. I doubt it'll be a real blast but, hey like they always say, food tastes better if you cook it yourself. If I can get something working, I'll be happy. And then, maybe I can work on some solving algorithms. :D
Class progress updates:
Linear algebra: Watched first half of lecture 5.
Udacity 101: finished unit 6 and completed the final exam. I'm essentially finished here, but I might do the final exam bonus questions, and watch the videos in the last segment. I'm still a little fuzzy on exactly what PageRank does. I'll have to figure it out.
No comments:
Post a Comment