Yahtzee
-
So I was experimenting with Elm and I ended up making a mobile friendly version of Yahtzee:
If you've not played it before, the aim is to fill the scoreboard with the best overall score you can get. Each turn you get three rolls and you can lock and unlock dice after each roll.
You can click a score slot name for details about how each score works and bonuses. When you choose a score for the turn, a little undo button appears next to it (in case you tapped the wrong slot).
There's a link to the hub of gits in the menu.
Enjoy!
-
@Keith
Does it allow for the upper bonus and just not show it, or does it not allow for it at all? I only ask because your dice were too rigged to let me finish my upper bonus
-
@izzion Yep, the upper bonus is there. Tap one of the upper section score names for details. I think it's a complete implementation.
-
I couldn't figure out how to check my email with it, but the game part works OK. 3/5 s
-
This post is deleted!
-
Works well.
Considering I briefly forgot how to play at first, is this a good score?
260
-
Does it have the +50 bonuses for Yahtzees beyond the first?
Edit: Apparently, it sort of does, but gives +100 instead?
-
@kazitor High 200s is a good score if you don't score any Yahtzees.
@e4tmyl33t Yep, the rules that I followed said 100 bonus points for each extra Yahtzee. There are details in the help info for the Yahtzee score slot.
-
No bonuses. Boo.
-
-
@Tsaukpaetra noice. You did way better than that no-bonus @Zecc guy up there.
-
@Tsaukpaetra yeah yeah, I can use the browser console too
-
@Tsaukpaetra noice. You did way better than that no-bonus @Zecc guy up there.
Honestly, I think your game just hates me.
(Right after grudgingly using the Sixes slots I got four sixes)
-
Yahtzee! But still no bonii and the aces, twos, threes and fives all sucked. I didn't get a large straight either.
-
@Zecc Seems I was extraordinarily lucky on that first attempt. I've beaten that score only once.
Almost certain it's rigged.
-
@Tsaukpaetra yeah yeah, I can use the browser console too
You know, I didn't think of doing that. Will redo with hacked scores.
-
Is there some combination of rolls that will give you 69 in one or more of the sections and 420 overall score?
-
@hungrier not without browser hackery...
-
@hungrier None of the rows will give you 69 (since the largest total off 5 dice is 30, and none of the fixed scores are 69). However the upper total before the bonus could easily be 69. The upper bonus is 35. Assume you score 3 yahtzees for 250 points, intermediate total 354, so we have to score 66 points over the remaining 6 lines (two of which are yahtzees) which should have plenty of solutions.
-
Finally got a round without any 0.
-
190 *with* a Yahtzee. This game hates me.
-
-
-
@Keith Just making sure people actually open them.
You could add a server-side component to this, generating a GUID for each completed game that people could share as a link.
-
@pie_flavor I think it would be tricky to verify anything coming from the client unfortunately. I'm open to specific ideas on how it could work though.
I'm also open to thoughts on how the game could be extended.
-
@Keith I'd just encode the game result in a query string, maybe add a checksum character, and let folks cheat if they want. If they've changed the text to give you an invalid game result then start a new game instead. No security required.
-
@Parody Any reason not to do all that client side?
On a related note, the client currently persists game history into local storage. It stores enough to repopulate the scoreboard, but it's only used to calculate the summary view at the moment.
-
@Keith Not that I can tell. Once upon a time I threw together a dice roller web page that lets you share roll setups that way.
-
261... not too bad
-
So, tabulating scores...
- @e4tmyl33t at 370
- @Tsaukpaetra at 311
- @loopback0 at 303
- @sloosecannon at 261
- @kazitor at 260
- @pie_flavor at 255
- @Zecc at 224
- @Zecc at 203
- @Zecc at 190
- @Zecc at 161
Poor @Zecc I don't know how you do it.
-
@Tsaukpaetra said in Yahtzee:
Poor @Zecc I don't know how you do it.
The trick is to not post your lower scores
-
@Zecc is beating everyone on published sum total of scores though.
-
Since you mention it:
I was getting closer to my lowest score, but I got a large straight right at the end.
-
@Zecc ah, I think I see the problem. Are you a golfer by any chance?
-
@Keith
NoYes, my low scores have been totally on purpose.
-
@Tsaukpaetra said in Yahtzee:
Poor @Zecc I don't know how you do it.
I got plenty of low scores, I just didn't post them.
-
On a related note, the client currently persists game history into local storage. It stores enough to repopulate the scoreboard, but it's only used to calculate the summary view at the moment.
If it's supposed to work on a mobile device then it should probably store its entire game state. Mobile devices tend to be pretty greedy about reclaiming memory when you switch applications. A refresh of the page should return it to the same point in the game where you left off.
edit: upon looking at the code, it looks like maybe you're doing that.
As far as a score sharing link, unless you want to store results on the server-side, your best bet is probably just some kind of security by obscurity. Add a hash or checksum field, base-64 encode it all, and call that close enough. It could be decoded on either the server side or the client side, since there's really no server-side checking required.
-
@anotherusername yeah, it stores game history in local storage and current game state in session storage.
-
Just in the spirit of friendly competition:
You will notice that I have zero knowledge of CSS. On the plus side, though, I have zero knowledge of JS too so there isn't any.
201: http://18.191.193.133/scorecard/d6f6728f-724b-4345-a1c7-3e9689651ae8
-
@pie_flavor I hope you at least used a language that's as hipster as Elm.
-
@Keith I am so willing to bet it's one letter longer⌠contains an equal number of vowelsâŚ
-
@kazitor Perl?
-
I may have just killed someone's game.
I don't actually know how many simultaneous connections EC2 allows.
-
@pie_flavor I just got a 500 response when trying to roll. What's going on please?
-
@Keith No fucking clue. It was working, and then I posted it here and it stopped working.
-
-
Well, whatever the problem was, it seems to be spontaneously fixed. Hopefully. If it starts 500ing in the next eight hours, it's definitely EC2's fault, my code has absolutely nothing to do with it. And if it does 500, you'll at least have a cat picture to look at.
-
-
-
@Keith Exactly! Try to top 250.
Oh, and /scorecard can be replaced with /api if you wanted JSON for whatever reason.