Updated 7 Dec 2006
-THIS GAME WAS CREATED TO CELEBRATE OUR ONE-HUNDRED PUBLISHED M-FILES ON THIS MATLAB CENTRAL FILE EXCHANGE SITE. WE HOPE YOU REALLY ENJOY IT-
The Cubilete game (poker dice cup game) is played in many Latin American countries, but the rules vary all over the map, with many cultures playing a version that is very much like the game of Poker. Cubilete, its a typical game of Spain. It's the cup you roll the dice with (if not using the hand itself) and also the name of the game, Mexicans use this word but apparently Cubans do also, maybe others. For the standard Cubilete game, the players sit down around a table.
Each player, in its turn, places the five dices inside the glass, shake them to revolve them and utilizes the same glass to throw the dices on the table.
The player has three opportunities to try to obtain a thrown of high value. In each thrown the player has the liberty to leave on the table the dices that desire, and to throw the remainder. At the end of the round, once all the players have had opportunity to throw, the player that obtained the thrown more valuable is the winner.
In order to calculate who was the winner and the hand with he(she) wins, it calls to the function GCcubilete. In each thrown you will ear the typical cubilete shaking sound.
To initializee a new game, you must to call on Matlab the function cubilete.
Immediately it would display some active arguments, asking you:
- Number of players
- According to the resulting hand, in each player oportunity it will ask if he(she) want to thrown some dices again to try to improve its hand (three chances)
- At the end of each round, it will display who was the winner and with which hand
Antonio Trujillo-Ortiz (2023). Cubilete Game (https://www.mathworks.com/matlabcentral/fileexchange/13148-cubilete-game), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- Gaming > Card games >
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.