Dominoes are flat thumb-sized rectangular blocks each bearing from one to six dots or pips and usually joined on either end. They are typically twice as long as they are wide, making them easier to re-stack when used. The value of a domino is determined by the number of dots or pips on each side and may be described as a rank or weight, although these terms have not been universally adopted. Dominoes are used for scoring in various games of chance and skill, and have captivated people around the world for centuries.
Depending on the game, there are many different ways to arrange and play domino. Generally, each player has his or her own domino set and the tiles are placed in front of him on a table. A domino can be laid edge-to-edge against another domino, or stacked vertically. Stacking allows players to form a line of dominoes that is called a string, layout, or line of play. A player can also place a domino on its side or upside down to make it a square, thus enabling the tile to be used in a different manner.
When playing a game with more than one person, a domino is often referred to as a set or bone. The most common game is played with a double-six set, but many other games can be played with the same rules using different sized sets. A domino set is a collection of 28 tiles, and each player draws seven tiles from the stock when starting the game. The remaining tiles remain face down and are called the boneyard.
The rules of the specific game determine who makes the first play, but in general the player holding the highest domino begins play. If no player holds a high domino, the heaviest single or double may be drawn. Sometimes a player may buy an entire line of tiles from the stock, depending on the rules of the particular game.
When a tile is played, the matching ends of the two dominoes must touch completely. The way the chain develops is determined by the pattern of the line of play and any other rules that are in effect, such as whether doubles are always played crosswise or if each tile must be played with its matching side touching.
Some games count only the pips in the losing players’ hands at the end of a hand or game, while others may require the winner to add up the total number of pips on all tiles left in the winning players’ hands. In either case, it is essential to understand how a domino counts in order to win.
Using the Model API is simple and straightforward, but some settings are important to take into account. Among other things, you must ensure that the Model API is set to write files back to the Domino File System. If it is not, you will be unable to upload your Domino python code to the Model API.