Friday, November 21, 2014

has anyone seen the blank screen bug?

This morning, a player reported to me that they had tried to get to the site for about 1.5 hours, and were repeatedly met with a blank screen that looked like this:
blank page?

Is anyone else experiencing this? Please let me know. You can email me or post in the comments to this blog. I'm trying to get a feel for how frequently it happens.

[Edit: This bug should be fixed as of Dec 5, 2014. Please write me or post a comment if you see it again!]

Wednesday, November 19, 2014

server update - more bug fixes

The server was down for a brief time this morning to apply some bug fixes. I apologize for the disruption in your games!

Here's the summary of changes:

On occasion, the "Knock" button did not show up in Gin Rummy, when it should have. This is now fixed.

In Twenty-Nine, the "Accept" button became disabled when a new player entered the table. This is also fixed.

Some players have pointed out that the bots will waste a high trump card when defending a nil bid. They tended to use their high cards to trump, rather than bleed out trump cards. This is now fixed. Thanks to those who pointed this out, and helped to improve the bots!

Finally, your chat bubble has been shifted to the side a little further, so it will not obscure your cards anymore.

Tuesday, November 11, 2014

probability of no trump cards in a hand of the card game spades

[tl;dr: so far as I can tell, cards are dealt perfectly randomly at World of Card Games. If you think that the deck is stacked, it's probably an odd run of bad (or good) luck that you're seeing.]

Sometimes, players will tell me that they think the deck has not been properly shuffled. They've had an unusual run of bad luck. Perhaps in Euchre, they haven't seen a bower in their last 5 hands, and it looks suspicious. In Gin Rummy, their opponent was dealt a Gin hand immediately. Or in Spades, they've been dealt a hand with no trump cards too many times to be believable.

At World of Card Games, the cards are dealt randomly, and I see no way that the deck could be stacked. Here's how the deal of cards works in every game on the site:
  1. Every time that cards are dealt, an entirely new, ordered deck of cards is created by the system. It's as if I took a fresh pack of cards out of a sealed deck; the old deck is not re-used.
  2. Then, these cards are "shuffled" using a random number generator.
That's it! It's very simple. You may see odd results, just like you might see a long run of "heads" in a repeated coin toss. But it's just random.

For those who are curious, just what is the probability of getting a trump-less hand in Spades? Here's an explanation:

A hand in Spades consists of 13 cards from a deck of 52. The number of combinations of such cards is 52! / (13! * (52 - 13)! ). According to Google's calculator, that is 635,013,559,600 (over 635 billion). That number includes all trump-less hands, and all hands with trumps as well.

To be clear, this does not count combinations in which the cards are merely reordered. For example, this count includes an entire hand filled with Spades, but only one such hand - the order of cards in the hand does not matter. For those who are hoping, this means the chance of ever getting a hand completely filled with Spades is 1 in 635 billion. "Not very likely" would be an overstatement.
all spades - dream on!
Okay, so how many of these hands are there that exclude trumps (Spades)? That is computed by taking all combinations of cards from a trump-less deck. A trump-less deck contains 39 cards (52 cards minus 13 Spades suit cards). Applying the formula for combinations again, we get 39! / (13! * (39-13)!). Google's calculator says this is 8,122,425,444 - about 8 billion different combinations of non-Spades cards.

So, there are about 8 billion trump-less hands in all 635 billion possible hands of Spades. The probability of getting a trump-less hand is the ratio of trump-less hands to all hands, which is about 1.28%. Not very likely, but it happens.

To test all this out, I ran a million simulations of Spades cards being dealt exactly as they are done at World of Card Games (using the same computer code). Here are the results:
  • There were 4,000,000 hands dealt in total
  • There were a total of 51368 trump-less hands, which is, indeed, 1.28% of 4 million [100 * (51368 / 4000000) = 1.28%]
  • The count of trump-less cards for the first player was 12772, second player was 12790, third player was 12996, and fourth player was 12810.
In case you are wondering about that last bit, a certain amount of variation is expected between the different players. Notice the third player was getting slightly more of the trump-less hands in the above experiment. When I ran the experiment again, it was the second player who got most trump-less hands (12945). A little bit of variation is expected because of the random nature of the events.

Saturday, November 8, 2014

new features for private tables, and some bug fixes

Sometimes, you're in the middle of a card game with friends, and you need a break. You want to refill your drink, let in the cat, baste the turkey, etc. If you were all sitting around a table at home, you could do this. However, it hasn't been possible at World of Card Games... until now.

A "Pause" button was added, for private tables only, with this morning's update. Please chat amongst yourselves if you want to pause the game, to let people know your plan. You must recruit a majority of players for the pause to take effect. For example, if there are 4 (human) players at the table, at least 2 must hit the Pause button. If there are 2 players, then 1 player hitting the pause button is sufficient. When everyone is ready to continue, hit the "Continue" button.

Here's a screenshot of the new buttons, in the upper left corner:


I hope that using this new feature is relatively intuitive. If anyone has trouble with it, please write me with details. I may make changes to this in the future; it's experimental.

By the way, I did not add this to public tables, since I thought that most players, who are not really chummy with each other, would not take kindly to pausing a game.

There are some other, more minor changes.

I have increased the timeouts in 29 (Twenty-Nine) from 15 to 20 seconds for playing a card. It doesn't seem like much, but I hope it makes a difference. Timeouts at private tables are now 40 30 seconds, for all games. [Edit: 30 second timeout at private tables was applied Nov 19 2014 due to feedback.]

I've also deployed a few bug fixes. The site has had a problem with tables freezing in Hearts. I discovered a major bug that could cause that to happen, and it has been fixed. A big thank you goes out to the person who reported this to me most recently!

I've fixed a bug in Gin Rummy that allowed you to knock when you shouldn't be able to do so - another big thank you goes to the player who reported this (including a screenshot)!

Finally, I've added a small improvement to the Euchre bot strategy. This was suggested by a player who noticed that they could use a little fine-tuning. I'm no expert, but I think the bots are getting pretty difficult to beat in Euchre. This is largely thanks to a couple of very helpful Euchre players who have been great about giving me tips. Thanks to you both!

As always, let me know if you see any problems at the site. I'm constantly working to improve it.

Monday, October 27, 2014

new features! 'like player' icon and table listings

This morning, the server was updated with a couple of new features.

Hopefully everyone knows about the "dislike player" icon that can help you avoid players you don't like... (if you don't, go take a look at the blog post which describes it). Now, you have a way to keep track of players that you like as well! There's a yellow star next to each player:
like this player
Click the yellow star to "like" the player. This adds them to your "liked player list." You can edit this list by clicking on your player name at the upper right, and scrolling down to the "Manage Likes" section.

Another new feature is the table listings area. Use the "list of tables" link at the lower left corner to open a panel that displays card games with available seats:
table listings
Notice the emphasis on "available" - only tables where you are allowed and that have open seats are shown. For example, if you are not a registered user, and there's a table that allows "Registered Users Only" with openings, it will not be displayed in the list. Full tables with games in progress are not shown either.

The list displays registered users with a green "R" while Guests are indicated by the letter "G" and robots are a pink "B". A yellow star () indicates a player that you have liked. Empty seats are indicated with an open square (☐). Relevant information is displayed about the table as well.

You may click on an empty seat, indicated by an open square, to take that seat. Be aware that if the seat is taken before the panel updates, you won't be able to take that seat! So grab it quick if you are interested.

Sunday, October 5, 2014

server update - gin rummy bug fixed

The server was out briefly for an update this morning. Sorry for the interruption in games!

The update included a couple of changes. There was a bug in Gin Rummy which caused bots to time out, occasionally. Thanks to everyone who reported this! I found a problem which caused that, and fixed it. Please let me know if you see any other problems.

The drag-and-drop functionality in Gin Rummy has also been altered slightly, so you can now see the card that you've picked up to sort. I hope this makes sorting a little easier. Also, sorting now works on tablets - at least on the devices that I have available for testing. Let me know if this does not work for you.

Finally, the Hearts robots have been tuned up a bit, so they will no longer be so cooperative towards someone attempting to shoot.

Sunday, September 28, 2014

new game! - gin rummy


Gin Rummy - click to play!

 Gin Rummy is now available at World of Card Games! This is a 2-player game that tests your pattern-matching abilities and your memory. The rules are described at the Pagat website.


As usual, there's a tutorial to get you started (click on the "Tutorial" button to the lower right of the Gin Rummy panel on the main page). And you can play with robots if you want to get comfortable before playing with real live humans.

One thing that will help when playing is the ability to sort your cards via "drag-and-drop" functionality.

Give it a try and let me know what you think! Please let me know if you notice any bugs.

[Edit: I just noticed a bug near the end of the Tutorial - a warning message shows up which says "You are not currently playing a game!". I'll fix this eventually, but in the meantime, you can continue the tutorial just by clicking the "x" in the upper right corner of the message - Sep 28 '14 12 PM EDT]