View Full Version : at long last! a new challenge!
inkedmn
10-29-2002, 09:14 PM
who likes yahtzee?
i'm sure most (if not all) of you have played this game at some point in your life. if you haven't (or you just don't remember exactly how it's played), here (http://grail.sourceforge.net/demo/yahtzee/rules.html) is an explanation of the rules.
the challenge is to code this game. a gui isn't required, but obviously it would be pretty cool :).
any takers?
(i'm going to do it in python initially, and possibly java if i can find the time).
oh, and if anybody knows where there are some .png images of the different dice faces, please post the location :)
get to work!
Strike
10-30-2002, 01:41 AM
Should be some images in the gTali package (gnome games). I can extract them if you REALLY can't find them (rather not have to though :))
jamessan
10-30-2002, 10:22 PM
I should have a C/C++ version up by the end of the weekend (got a paper taking up my week). If I have time, I may drop into linux and create a gui.
Here's another set of rules with picture of the yahtzee score sheet.
http://www.cs.nmsu.edu/~clbrown/ta/187SP00/HW2/YahtzeeRules.html
inkedmn
10-30-2002, 10:34 PM
sweet :)
i started my python version a couple nights ago at my mother-in-law's house, so i have to get the code from there somehow. i just did the easy stuff (ScoreCard and Player classes), the real meat will be the RollHandler class...
looking forward to it :)
bwkaz
10-30-2002, 10:50 PM
Oh, man, I wish I had free time!
And yet here I am, reading these boards... hmm... methinks something's wrong.
recluse
11-01-2002, 04:12 PM
Re:http://www.cs.nmsu.edu/~clbrown/ta/...htzeeRules.html
Are "Joker Rule's" part of the standard rules?
Oh and btw, I wonder if I'm the only one getting sleepy reading through these rules.
jamessan
11-01-2002, 04:38 PM
I've never played with the Joker's Rules, but it is in both sets of rules linked in this thread.
sedarious
11-04-2002, 05:52 PM
Heh, I did the challenge in PHP (command line) cause its what I had to play with here at work. I will post it when I get home as an example of how to not code. It is a horrendous mess of non-function using barf. I was basically just bored at work and needed something to do. It does work though. I will code a tidy little C++ one sometime this week with sexy classes and functions.
jamessan
11-04-2002, 08:25 PM
I finished my C++ version of Yahtzee. It's a single player version. Could probably be hacked to be multi-player pretty easily. I may implement that as well as document it when I have some more time. You can check out the source at http://www.zero-entropy.net/yahtzee.cpp
<edit>Forgot I still have to add in the Joker's Rule. So, aside from that, the code is complete. :)</edit>
<edit>Updated with Joker's Rule code.</edit>
sedarious
11-09-2002, 06:08 PM
here is the cpp version of yahtzee and the php version of suck.
http://zero-entropy.net/yahtzee/main.cpp
http://zero-entropy.net/yahtzee/dice.cpp
http://zero-entropy.net/yahtzee/dice.h
http://zero-entropy.net/yahtzee/scorecard.cpp
http://zero-entropy.net/yahtzee/scorecard.h
http://zero-entropy.net/yahtzee/declarations.h
There is some slight lazyness in the main concerning the joker rule. A little more sloppy that I would like. The php is added as an attatchment. do not write code like my php.
jamessan
11-25-2002, 05:17 PM
I noticed a couple more bugs in my code. Once I get those cleaned up, I'm thinking of creating a Tcl/Tk GUI for the program. If anyone has any tips, as this is my first time playing with Tcl/Tk, feel free to provide some linkage/hints. :)
GnuVince
11-25-2002, 06:03 PM
jamessan: I have a couple of Ruby/Tk links, as well as a general rule on how to translate Perl/Tk doc for Ruby.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.