function piles = piles_deal ( )

%*****************************************************************************80
%
%% piles_deal() deals the cards in a simulation of clock solitaire.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 April 2022
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    integer piles(13,4): contains a permutation of the indices 1 throug
%    52, negated to indicate that the cards are "face down".
%
  shuffle = randperm ( 52 );

  piles = reshape ( shuffle, 13, 4 );
%
%  Cards are facedown.
%
  piles = - piles;

  return
end

