Einar Egilsson


Posted: Last updated:

Yet another card game finished. The last card game I created was Hearts, which is a trick taking game, but you play on your own. This time I wanted to create a game where you play in teams, so a human player and a computer player work together against two other computer players. So I created Spades, a nice trick taking game where you play in teams and must bid before each hand how many tricks you think you'll take.

It was an interesting game to implement, especially making the computer players work sensibly with their partners. Usually you want to get as many tricks as possible, but you can also bid 0, and then you can't take any trick, and your partner has to try to help you out if he sees that you are about to take the trick. You also have to be careful to not get too many tricks above your bid, since if you get 10 tricks more (over the course of a few hands) you'll get a big penalty.

I can track the win percentage of the human team and the computer team, so far the computer team only wins about 35% of its games, but it's a nice challenge to try to make it win more. And now that the game is live, and has lots of plays every day it's a lot of fun to tweak the computer players, publish the new version and then see the next day if the win percentage goes up or down.

For my next project I think I'll do something different. I'm going to do a Solitaire game, which will be at https://cardgames.io/solitaire/, if that's fun then I'll probably add a few others later on.

If you read this far you should probably follow me on Twitter or check out my other blog posts. I no longer have comments on this blog, but you can send me an email if you have some comments about this page.