Announcing Pig! (yet another dice game)

I've implemented the die game Pig, but this time entirely in Racket [1], a Lisp-language relative (read: functional programming). This is BETA and open for TESTING.

The game uses SCGI instead of CGI in order to elminate repeated calls to load and unload a CGI program: Pig is loaded into memory and waits for connections. The SCGI portion was created from scratch as well.

Thanks to @stack for the Lisp inspiration.

Play Pig!

About Pig!

Pig! Project Source

Racket Lang

๐Ÿ€ gritty

Mar 22 ยท 7 weeks ago ยท ๐Ÿ‘ bluesman

10 Comments โ†“

๐Ÿš€ stack ยท Mar 22 at 02:17:

I am really proud of you!

I hope you're enjoying Racket, although Common Lisp is my preferred lisp... But any lisp is just so much better than anything else.

๐Ÿ€ gritty [OP] ยท Mar 22 at 02:22:

@stack thanks! I'm pretty proud of the accomplishment

๐Ÿš€ stack ยท Mar 23 at 16:18:

A couple of small anomalies:

๐Ÿ€ gritty [OP] ยท Mar 23 at 19:51:

hmm, thanks I'll check those out. 21 I'd an easy fix, it's just the counter. I'll reroute to leaderboard on game completion

not sure about the other one

๐Ÿ€ gritty [OP] ยท Mar 26 at 02:04:

I updated the interface to display "end" for the round when the game has finished, and the "roll" link now says "finish"

@stack - I replicated your issue swapping certificates. this is Lagrange's functionality and only happens if you immediately swap certificates. If you "stop using certificate" first, it works as intended. The reason is that Lagrange immediately associates the new certificate to the /roll path as the top domain/path. I don't think this is possible in Alhena because of the way the certicates are loaded and associated in that browser.

The only way around this that I could think of is to redirect to the base url for every action, but I'd prefer not to hit the db twice for every roll or stand action. I may think on this some more or let it be as it seems to be a small edge case that I don't think would be common.

Edit: I've yet to push the udpates; I want to test it to make sure I didn't break anything.

Edit 2: I could maybe detect the path upon new user creation

๐Ÿš€ stack ยท Mar 26 at 02:17:

It's not something that normally happens and it's not thar hard to enter the same identity the second time if necessary. I just wanted you to be aware.

๐Ÿฅœ smallpatatas ยท Apr 03 at 06:30:

this rocks!

i don't have any bug reports for you, but i do have a question: what do the percentages represent?

๐Ÿ€ gritty [OP] ยท Apr 03 at 13:35:

thanks!

probably of not rolling a 1 successively. 5/6 * n

๐Ÿฅœ smallpatatas ยท Apr 22 at 18:48:

continuing to enjoy this game :)

small bug - the 'back' link at the top of gamelog/index.gmi reloads that page, guessing that's not the intended behaviour

๐Ÿ€ gritty [OP] ยท Apr 22 at 22:11:

yes, thanks I noticed that as well. I've been meaning to fix it. the archive process doesn't fix the links in the page.