The person who holds the 2 of clubs must lead it to the first trick. The other players, in clockwise order, must play a card of the suit which was led if possible. If they do not have a card of that suit, they may play any card. The person who played the highest card of the suit led wins the trick and leads to the next trick.
It is illegal to lead a heart until after a heart has been played to a previous trick, unless your hand contains nothing but hearts. Discarding a heart, thus allowing hearts to be led in future, is called breaking hearts. In general, discarding a penalty card on a trick is called painting the trick.A player whose hand consists entirely of hearts may lead any heart, thereby breaking hearts, even if hearts have not previously been broken.
Players are permitted to lead spades to any trick after the first. In fact it is a normal tactic to lead lower spades to try to drive out the queen. This is sometimes known as smoking out the queen.
Normally, each player scores penalty points for cards in the tricks which they won. Each heart scores one point, and the queen of spades scores 13 points. However, if you manage to win all the scoring cards (which is known as a slam or shooting the moon), your score is reduced by 26 points, or you may choose instead to have all other players' scores increased by 26 points.
The game continues until one player has reached or exceeded 100 points at the conclusion of a hand. The person with the lowest score is then the winner.
Hearts is a Javascript application which is programmed using Dart programming language. Server application of the game is Java application running in the Google App Engine.