Debian Codegraph @

examples/book/digital-artists/chapter2/Listing2.2.ck

raw
1 // Listing 2.2 Random integer generation using the Math library
2
3 // random integer number generation
4 // simulates the roll of a die
5
6 while (true)
7 {
8 <<< "Dice Roll =", Math.random2(1,6) >>>;
9 second / 2 => now;
10 }
11