All pastes #816541 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-12-14 21:06 UTC
rendered paste body
/*********************************************************
 Name : procedure playorder
 By : Daniel Sullivan
 This will determine the order players will go in.
 ********************************************************/
procedure playorder;
    var t : array 1 .. playernum of int;
    for x : 1 .. playernum
        t (x) := rolldice; % Rolldice returns a random value between 1 and 6
        put "t(", x, ") = ", t (x)
    end for
    % Need a sorting function to sort the array from largest to smallest and to make sure no two values are equal.
end playorder;