Monty Hall problem: Difference between revisions

Content added Content deleted
(→‎{{header|D}}: added Dart version)
Line 683: Line 683:


=={{header|Dart}}==
=={{header|Dart}}==
The class Game attempts to hide the implementation as much as possible, the play() function does not use any specifics of the implementation.
<lang dart>int rand(int max) => (Math.random()*max).toInt();
<lang dart>int rand(int max) => (Math.random()*max).toInt();