This is a blueprint, but the concept applies in a widget.
Basically, there are 9 valid locations, and each piece can go in any of those positions, in one of four rotations.
I put the valid locations in an array
Then I mix the array and run through a list of the pieces. Each ends up in a random location, and I set the rotation randomly.
Effect


