Difference between revisions of "Array.shuffle()"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
MAGICSQUARE(3) | MAGICSQUARE(3) | ||
− | {| class="wikitable"|- | + | {| class="wikitable" |
+ | |- | ||
| 2 || 7 || 6 | | 2 || 7 || 6 | ||
|- | |- | ||
Line 16: | Line 17: | ||
|- | |- | ||
| 4 || 3 || 8 | | 4 || 3 || 8 | ||
+ | |} | ||
+ | |||
+ | MAGICSQUARE(3).shuffle() | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | | 9 || 5 || 1 | ||
+ | |- | ||
+ | | 4 || 3 || 8 | ||
+ | |- | ||
+ | | 2 || 7 || 6 | ||
|} | |} | ||
==See Also== | ==See Also== | ||
− | [[Array. | + | [[Array.random() | random]] |
[[Array.deal() |deal]] | [[Array.deal() |deal]] |
Latest revision as of 03:04, 14 May 2020
Array.shuffle()
shuffle the array randomly.
MAGICSQUARE(3)
2 | 7 | 6 |
9 | 5 | 1 |
4 | 3 | 8 |
MAGICSQUARE(3).shuffle()
9 | 5 | 1 |
4 | 3 | 8 |
2 | 7 | 6 |