An interesting musical game, Musikalisches Würfelspiel (musical dice game) has often been attributed to Mozart.
The basis of the musical dice game consists of 272 musical measures and a table of rules used to select specific measures given a certain dice roll. The result is a randomly selected 16 bar minuet and 16 bar trio.
The famous version of the dice game attributed to Mozart, was first published only after his death in 1793 by J.J. Hummel in Berlin-Amsterdam, and afterwards several times in different forms. While this challenging idea had been known and tried out by other composers before Mozart, it was Mozart's game which became famous and successful. Though neither the original manuscript of the "Musikalisches Würfelspiel" nor direct references to it by Mozart were ever found, his authorship was never really questioned by publishers or musicologists.
A game with identical musical sections was described in the February 1787 issue of a publications called Journal des Luxus und der Moden (Journal of Luxury and Fashions!). W. A. Mozart may have been connected with or influenced by this publication.... the later dice game attributed to him contains a rule table which is identical to the minuet table in the publication..
All possible choices were given by Mozart in such a way that by any selection the resulting melody is a pretty minuet fulfilling the harmonic and compositional requirements of minuets of that time.