@verb #8084:"Stats" this none this rxdo #8084 @program #8084:"Stats" this none this {?players = 8, ?runtimes = 500} = args wins = $list_utils:make(players, 0) for _count in [1..runtimes] cards = $list_utils:make(52, {0, 0}) x = 1 for suit in [1..4] for card in [1..13] cards[x] = {suit, card} x = x + 1 endfor endfor cards = $list_utils:scramble(cards) cards = $list_utils:scramble(cards) pulled = {} for x in [1..players] pulled = setadd(pulled, {@cards[x], x}) endfor while (length(pulled) > 1) "#8084:tell(toliteral(pulled));" max = pulled[1][2] for x in (pulled) if (x[2] > max) max = x[2] endif endfor "#8084:Tell(toliteral(max));" delete = {} for x in [1..length(pulled)] if (pulled[x][2] < max) delete = {@delete, x} endif endfor "#8084:tell(toliteral(delete));" for x in ($list_utils:reverse($list_utils:sort(delete))) pulled = listdelete(pulled, x) endfor "#8084:tell(toliteral(pulled));" for x in [1..length(pulled)] pulled[x] = {@cards[random(length(cards))], pulled[x][3]} endfor endwhile wins[pulled[1][3]] = wins[pulled[1][3]] + 1 $cmd_utils:suspend_if_needed(0) endfor return wins "Last modified by Lao-Tzu (#8084) on Fri Dec 29 20:45:02 2000 MST." .