Closed yed closed 10 years ago
onclick => onsubmit javascript event change will probably solve this.
Someone should just rewrite the whole Kingdom Generator form. Something with dropdowns and radioboxes.
Yes, that would be better. But I lack time and also motivation for this. I almost never use kingdom generator.
Same. Nor do I care about avatars.
I actually have some time to work on this again. First I'll worry about just fixing the pressing enter issue, then I'll worry about rewriting it. (unless some of this is covered by the "Create Game II" in replace-game-dialog?)
I think this fixes the enter issue, but also causes it to exit on error (like if they type "Oasis" instead of "Oasis, All") again. I have an idea why, I'll take a look again soon.
a6b8ea6e9b
e79afa5903 fixes exiting on error for Chrome.
The kingdom generator doesn't work for Firefox at all on this branch now, I'm not sure why. Maybe it's not happy with using jQuery to bind to the submit event?
Yes, I plan for the "Create Game II" in replace-game-dialog to include a UI for the kingdom generator. It might be a while before I release that, though, so don't let me stop you.
On the other hand, you should definitely check out kingdomGenerator2.js in that branch, a massively simplified and commented version of the original kingdom generating logic. It's currently usable from the command line right now, like
GS.generateKingdom("Moat, Attack, 3 * Seaside + Prosperity");
What it's still missing is knowledge of which sets you own. That used to be accomplished by overriding one of the deck generating functions and caching the "cachedCards" object, which includes that information. But that override is getting in my way elsewhere, so I want to do the lookup directly instead (as automatch.js does).
Hitting enter instead of clicking to Ok in Kingdom Generator reloads page to http://play.goko.com/Dominion/gameClient.html?selval=All