buttonmen-dev / buttonmen

Buttonmen - an online dice game
Other
16 stars 24 forks source link

Invalid Swing die choice causes loss of other valid Swing dice choices? #1387

Open jimmosk opened 9 years ago

jimmosk commented 9 years ago

In http://buttonweavers.com/ui/game.html?game=2375 I'm playing schwa, which has five different Swing dice. I just entered my choices for the five dice, mistakenly entered an invalid value for one of them, and was presented with the value selection screen again with the error message "Invalid value submitted for swing die f(V)" at the top... and all of the value-entry boxes wiped. I say those swing dice which were given valid values ought to have their value-entry boxes populated with the previously-chosen values in such a case, with only the invalid one(s) blank.

cgolubi1 commented 9 years ago

Weird. I would have guessed the code loaded the previous values from the Activity variables, but it seems it doesn't. I agree that it should.

cgolubi1 commented 9 years ago

Flagging this for the interest of lauracs or nkmcalli: this is a rare example of a fix which really is UI-only (there's no API or backend component) and involves copying functionality (the use of the Activity object to save information and put it in place again after a failed form submission) that exists in other places in Game.js, to new places in Game.js.

It's the kind of stuff someone would want to get familiar with if they were going to do UI for new skills like Turbo or Sideboard, and in the realm of things like that, it's an easy fix (unless i've missed something). So if that sounds interesting, snag it.