From b9d4f99f1c45e4a1b8e79260559193bfb97375d5 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 29 Aug 2017 11:09:04 -0400 Subject: [PATCH] Use the updated rand library The random module is deprectated. As a bonus, the newer module generates a random seed for us by default, too, ensuring actual random behavior. --- src/riichi.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/riichi.erl b/src/riichi.erl index 8212ef4..cdf5c2c 100644 --- a/src/riichi.erl +++ b/src/riichi.erl @@ -169,7 +169,7 @@ find_sets(Tiles) -> -spec shuffle(list()) -> list(). shuffle(List) -> - [X || {_, X} <- lists:sort([{random:uniform(), I} || I <- List])]. + [X || {_, X} <- lists:sort([{rand:uniform(), I} || I <- List])]. -spec tiles() -> [string()]. tiles() ->