Web Paint-by-Number Forum
Topic #346: Web Sol
By Jan Wolter (jan)

#1: Jan Wolter (jan) on Aug 16, 2012

So in the course of trying to get a bunch of old half-completed projects pushed out the door, I've also been doing some work on one that is unrelated to webpbn, my solitaire program, which is now available here:

http://unixpapa.com/websol/

This is kind of a stupid project, because there isn't exactly a shortage of programs that let you play solitaire on your computer. For me it was kind of an experiment in building a fairly elaborate application 100% in Javascript. Unlike webpbn, websol's server does nothing. Well, nothing except send your browser some text files and image files when it asks for them. There is no database on the server, and no computation on the server. And why should you care about that? No reason I can think of, but I think it's cool.

So it supports several dozen different solitaire games, and lets you change the rules, modifying the rules of standard games to fit your personal tastes, or mixing and matching the rules to make entire new games. You can save your rules modifications, but not to any public database - they are only saved within your browser.

It also does fancier animation than most of the other Javascript games I have written, with some ability to have multiple cards flying around at once, which comes in hand for the "boom" that occurs after you win a game. That can be a bit of a browser performance test, especially in solitaire games with multiple decks of cards.

I suspect that it still has some flakiness hiding in it. The business about letting you mix and match rules means that there are all sorts of cases where the rules can interact in weird ways and the logic to do things like automoves and detect when you have no legal moves left gets crazy complex. I do have a weakness for adding one more feature after another until the complexity gets overwhelming. Oh well.
#2: David Bouldin (dbouldin) on Aug 16, 2012
Very cool, Jan!

Thoughts:
- three misspellings (existence, solitaire, arithmetic) in your "Malarkey" tab
- "Usage" tab gives me a 404 (Chrome, Win7)
- is there a way to make a tableau card move to an available empty cell with a double-click rather than drag?
- Is there a way to sort the games list by type (with variations) so the Forty Thieves, Freecell, etc. games are grouped together? I do like that there is the list of "Similar Games" in some of the rules sections.
#3: Jan Wolter (jan) on Aug 16, 2012
I just noticed that it completely does not work in IE.
#4: David Bouldin (dbouldin) on Aug 16, 2012
It works in my IE 9.0.8112.16421 with Javascript 3.4; HTML 3.2; FSA 3.3.

(and in my Chrome 21.0.1180.79 and in my Firefox 14.0.1 if that helps at all)
#5: Jan Wolter (jan) on Aug 16, 2012
Yeah, it turns out that my IE 9 had decided, entirely on it's own, that every page under unixpapa.com had to be rendered in IE 7 compatibility mode. I had to do some serious beating on it to convince it otherwise, but I finally succeeded and then it worked correctly. I keep running into this problem - IE 9 is capable of being a good functional browser, but it is really reluctant to do so, and takes every possible opportunity to drop back into buggy mode if it can.
#6: Jan Wolter (jan) on Aug 16, 2012
Fixed the spelling arrows and the missing usage page. Thanks for pointing these issues out.

I do have plans for alternate movement modes, but right now all moves are pretty much by dragging, except for deals from the deck which are by a click. Probably an area that needs work.

Categorizing games is hard - there are so many cross-breeds. I should probably add in more "similar games" links.
#7: Teresa K (fasstar) on Aug 16, 2012
It's fun to have some new card games to play. Well, new to me anyway. Thanks, Jan.
#8: Tom O'Connell (sensei69) on Aug 17, 2012
Wow.... free cell was fun to play...thx Jan
#9: Byrdie (byrdie) on Aug 19, 2012
Great ... another time sink. I just spent several hours there and haven't tried it all. I've bookmarked it and will go back.

Very nicely done.
#10: Jan Wolter (jan) on Aug 19, 2012
You'll have a way to go before you waste as much time with it as I have.
#11: Billie Patterson (bpat) on Aug 19, 2012
Is there a place you'd like for us to post bugs that we find?

I just played a game of Baker's, and all four foundation piles are filled with Kings on top, but the 7 of spades is still left on the tableau.

Also, this is just a personal quirk of mine, but I HATE to be asked if I really want to quit and start a new game.
#12: Jan Wolter (jan) on Aug 19, 2012
Ugh. That glitch is still there. I think it happens sometimes when you undo and redo a lot. A card gets left behind. Danged hard to debug. I'll keep looking.

I had meant to have it ask that only if there was an active game. Though sometimes when a game ends by going stagnant instead of being won or by running out of moves, then the software isn't smart enough to detect that you are done.

I'm not fond of "really quit" screens either, but I'm even less fond of accidentally losing games I was in the middle of when I hit the wrong button.

This is probably as good a bug report place as any.
#13: Billie Patterson (bpat) on Aug 19, 2012
I was just playing Double Free Cell (seed = 91135), and there are only 100 cards on the screen. I know one five of diamonds is missing, because I needed it, but didn't look for the other one.
#14: Jan Wolter (jan) on Aug 20, 2012
Oops. There is a 10x10 layout, but at the beginning of the game an Ace is supposed to be dealt to each foundation pile. As it as four random cards are missing. Wonder how I missed that.

Yeah, double freecell is currently unplayable.
#15: Jan Wolter (jan) on Aug 20, 2012
OK double freecell is fixed. Also repaired "Repair" which was only dealing one deck of cards although it is a two-deck game. Obviously when I added these I didn't test them out very well.
#16: Billie Patterson (bpat) on Aug 20, 2012
If you win triple Klondike, it won't autoplay the cards all the way to the end, even if they're pretty evenly distributed on the tableau. It stopped six or seven times when it had obvious good plays.
#17: Tom O'Connell (sensei69) on Aug 20, 2012
free cell the same with not autoplay for obvious plays
#18: Billie Patterson (bpat) on Aug 20, 2012
Playing Flower Garden, seed = 9734. Foundation piles have mixed suits in them. I'm looking at the three of diamonds, the five of diamonds, the six of hearts and the seven of spades. There are also only 51 cards to play with.
#19: Jan Wolter (jan) on Aug 22, 2012
Flower Garden is badly broken in the current release. I fixed it in the development version, but there are other things I need to fix in the development version before I put that on the main site.

Yeah, the weird stops in the automoves need to be diagnosed, but they aren't that high a priority. You can easily do some manual moves and get them restarted. They are more complex than they appear. If there are two sevens of diamonds in the tableau and only one six of diamond in the foundation, then neither should be moved, because the choice of which to move should be left to the user. If a user undoes an automove, then it should not automove right back again. In some games, you don't want to automove one suit too far ahead of the others. Things like this make the logic pretty complex. If it pauses prematurely sometimes, that's at least better than making inappropriate automoves.

A bigger bug is that occasionally illegal automoves will be made, like the 8 of diamonds gets put on the 6 of diamonds, leaving you with the 7 of diamonds left over at the end of the game. I think this happens with some combination of cancelling automoves (if you click on any card during an automove it will stop executing them ... I hate games that go catatonic while they are automoving) and undoing automove. This is hard to debug because it is hard to reproduce.

I am also adding more features and games and doing some reorganization of the games list. So this thing is very much a work in progress.
#20: Byrdie (byrdie) on Aug 26, 2012
One interesting thing I've seen in a couple different games (sorry, didn't make note of which ones) is the game automoving aces to the foundation. In a couple different instances the game moved the ace one pile to the right of the next open pile. Interestingly enough it then placed the next ace on top of it. In one instance it had also placed some successive cards on the misplaced ace. This caused some interesting problems further in the game where subsequent cards would not play on the covered pile.

The solution was to undo play to the point of the misplaced card and then manually make the moves to get play to continue correctly.
#21: Jan Wolter (jan) on Aug 27, 2012
Weird. I haven't seen that glitch.

I'm working on a new version, which will have it's own domain name, even more games, google ads, and, hopefully, fewer bugs. The ads will be readily dismissable, but I want to see if I can actually earn some money from all this free software I keep writing.
#22: Tom O'Connell (sensei69) on Aug 27, 2012
great idea Jan.... i wish you luck :)
#23: David Bouldin (dbouldin) on Aug 27, 2012
i'll even click through the ads for you!
#24: Jan Wolter (jan) on Aug 29, 2012
Don't overdo it. Weird behavior patterns will get me on Google's black list. They really don't like being scammed. It's actually against their rules for me to encourage people to click on the ads on my pages.
#25: David Bouldin (dbouldin) on Aug 29, 2012
nothing weird, i promise.
#26: Joe (infrapinklizzard) on Aug 29, 2012
Also, most ads are paid per view, and per purchase. Click-throughs don't count for much anymore unless you buy something on the site.
#27: Tom O'Connell (sensei69) on Aug 29, 2012
I'll honor your request, Jan
#28: Jan Wolter (jan) on Sep 7, 2012
So I've been working on this thing and the new version is now up.

I probably should have bought the "websol.com" domain name when I started the project, but it's gone now, so I bought a different one. It's now called http://politaire.com

I think I fixed all the bugs people reported to me and there are lots more games. I expect to keep expanding it for a while, but the thing is already a monster of complexity hiding behind a thin veneer of simplicity.
#29: Tom O'Connell (sensei69) on Sep 7, 2012
thanks Jan
#30: Jan Wolter (jan) on May 20, 2013
The http://politaire.com web site has been much improved since I last posted about it here, with support for some 370 different solitaire games and a mind-boggling number of option settings.

But I'm having a bit of a problem that reminded me of the discussion here - Google Ads has black-listed me.

It turns out that they have the very interesting policy of not telling you what you did wrong, because that would allow people to figure out exactly what the rules are and thus scam the rules. This makes appealing the decision extremely tricky.

So I'm trying to figure out what could have gone on, and I'm wondering if any of the webpbn users who also use politaire would have any clues.

One possibility that has occurred to me is that the the little "X" that closes the ad frame might be too close to the ad. This might cause some users on tablets and phones to accidentally click the ad sometimes when they just wanted to close it. That might be detected by Google as excessive insincere ad clicking.

Anyway, if any one has any bright ideas, I'd appreciate hearing about them.

Goto next topic

You must register and log in to be able to participate in this discussion.