Here are some projects I have worked on.
I implemented a version of the card game 'Pitch', also known as 'Setback' for the Palm OS. The game (like the platform), has stagnated over the years, but was always reasonably popular, and I am very happy with it. I might release the code at some point, and I've thought about porting it to other platforms as well. For now, you can download Pitch for the Palm OS, and the rules for the game are listed below.
Pitch can be bought via PalmGear.


The deck is a standard fifty-two cards, aces are high. There are four players, two in each team, with partners facing each other. Each player receives six cards, dealt three at a time.

There is one round of bidding. The possible bids are two, three, four and smudge (smudge is really a bid of five). Each player in turn either passes or bids higher than the previous bid if any, except for the dealer, who, having last bid, may "steal the bid" by bidding the same as the highest bid. The winning bidder has the right to name trump and lead the first trick.
If the first three players pass, the dealer must bid at least the minimum bid of two. This is called a "force bid".
The bids represent how many of the following four items will be won when the tricks of the game are played out:
Whichever side has the higher total in its tricks gets the point for game. In case of a tie, no one gets this point.

The bid of smudge requires all six tricks to be won by the declaring side, in addition to the four points listed above. (Sometimes a team can win all the tricks, but if the jack of trumps was not dealt, that is not sufficient to win a smudge bid.)

The pitcher leads a card to the first trick, and the suit of this card becomes the trump suit. The winner of each trick leads the next, and may lead any card. A player who has a card of the suit led must either follow suit or trump. Players may play trump on any trick, even if they can follow suit. A player who has no cards of the suit led can play anything - either a trump or a card of another suit. Each trick is won by the highest trump card played, or if there are no trumps in it then by the highest card in the suit led.



If you made a bid and got the points required, you get the total number of points you make (in other words, if you bid two and make four, your team scores four points). To score five points (smudge), you need to actually bid smudge - if you bid four, and actually win all the tricks, including the jack of trump, you still only score four.
The non-bidding team makes whatever number of points they earn.
If a team fails to make a bid it loses the value of the bid, while the other team scores whatever points it took. Teams can have a negative score.
A team needs 21 points to win, but you can only win at the end of a hand in which they made their bid. Because of this, it's possible for the winning team to have less points than the losing team. For example, suppose that we have 18 points and they have 24, but they have not yet won because they acquired their last 4 points playing against our bids. If we now bid 3 and make it, and they take 1 point, we win, even though we have just 21 points while they have 25.
If the game is tied, then play continues until someone wins a bid and the game is no longer tied.
| Attachment | Size |
|---|---|
| pitch.zip | 49.24 KB |
| pitch.prc | 148.32 KB |