Normally the game ends when one player uses all of their tiles.
The game may also end when no player can make a move. This is detected
if all players pass or trade three times in a row.
When the game ends, final scores a calculated and the winner is displayed.
If the Keep Game preference is enabled, the game is saved into
the game history.