Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Yahtzee

by jotti (Scribe)
on May 06, 2002 at 11:57 UTC ( #164290=perlquestion: print w/replies, xml ) Need Help??

jotti has asked for the wisdom of the Perl Monks concerning the following question:

I'm working on a CGI Perl version of Yahtzee. I tried to find on the net something but found only an ugly Java implementation of the game. Seems like my Yahtzee has all chances to be something special on the net. Or can anyone point me to a site with an online Yahtzee game? My version will implement a Finnish version of the game where there are 15 combinations. First the 1's to 6's, then One Pair, Two Pairs, Three of a Kind, Four of a Kind, Full House, Little Straight (1, 2, 3, 4, 5!), Big Straight (2, 3, 4, 5, 6!), Chance and Yahtzee.

The scoring also seems to differ. In all combinations you score the sum of the significant dice, except for Yahtzee, which scores 50.

Among other things I want to test how to implement multiplayer facilities with browser windows redrawn only wen needed, using only HTML with frames, no Java, ASP or server push, I don't even know what they are. Jawa was a classic East European motorbike (;-b)

Replies are listed 'Best First'.
Re: Yahtzee
by mt2k (Hermit) on May 06, 2002 at 18:11 UTC
    The game iteself is perl-related.
    The questions you have asked have nothing to do with the perl side of it.
    Even though that statemenet is true...

    jotti said:

    I want to test how to implement multiplayer facilities with browser windows redrawn only wen needed, using only HTML with frames

    mt2k replies:

    Impossible! You will have to use HTML's evil companion, JavaScript, or else you will have to use META refresh tags. META refresh is HTML-only as you said, but it cannot do "only wen needed". Frames are also disgusting. For an ugly demonstration of the evil JavaScript brings, try out mt2k's home node with JavaScript enabled and click around. (Works only in Internet Explorer). If this doesn't convince you of the evilness of javascript, then you are doomed!

    Several Monks Scream:

    That wasn't help, that was an advertisement for your home node!

    mt2k screams back:

    Wow, are you smart! First, have an award for Smart Monk of the Week and then notice that it did give him some info too :)

    Update: Whoops, you caught me while I am updating my home node some more. So yeah, it is under construction whoops!

      Quote from mt2k's home node:

      "Sorry, under construction!"

      My idea is to have a simple window showing a page constructed by a PERL script. The page includes a meta refresh tag that refreshes the page, say, every 5th second or even more often. There wouldn't be much to refresh on the page, except for a text saying "Control page". But the script creating the page would check the status of a game, a chat board or whatever, that runs in another window, not another frame in the same window. If the game window needs redrawing, the script would redraw it (using the target attribute), otherwise only the control page window would be redrawn.

      So this is a kind of faked only-when-needed redrawing technique. The visual game page might be devided into frames with one frame showing the game, another frame showing a chatboard.

      Im so sorry if this is not PERL enough, but I just started with Perl and I find this monastery very interesting. It's just that I havent found a forum where Perl, HTML, CGI, Yahtzee and frames can be discussed without someone immediately pointing out that "that's not a Perl subject" or "that's not a CGI subject".
Re: Yahtzee
by BUU (Prior) on May 06, 2002 at 12:28 UTC
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://164290]
Approved by jlk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-12-08 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?