Difference between revisions of "Array.shuffle()"

From ZCubes Wiki
Jump to navigation Jump to search
 
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
 
|}
 
|}
  

Latest revision as of 04: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

See Also

random

deal