Players take turns in removing any or all of the matches in any one pile.
The player who takes the last match loses. After playing a few games you quickly realize that there are certain losing combinations. Also the game is not restricted to 3 piles. You have 1x8, 2x4, 3x2 and 3x1. Removing 9 from the pile of 10 will leave you with 2x4, 2x2 and 4x1.