Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> Shuffle(array)

Description:

Shuffles the contents of the given array using the Fisher-Yates implementation.

The original array is modified directly and returned.

Parameters:

name type description
array Array.<T>

The array to shuffle. This array is modified in place.

Returns:
Description:

The shuffled array.

Type:
  • Array.<T>
Since: 3.0.0
Source: src/utils/array/Shuffle.js (Line 7)