diff --git a/Benchmark/take5/shallow/dealer.py b/Benchmark/take5/shallow/dealer.py index 23cbe9d..b1b099e 100644 --- a/Benchmark/take5/shallow/dealer.py +++ b/Benchmark/take5/shallow/dealer.py @@ -1,4 +1,4 @@ -from random import randrange, shuffle, random, seed +from random import randint, shuffle, random, seed from copy import deepcopy from player import Player from typing import List, Tuple @@ -60,12 +60,11 @@ def create_deck(self, deck_size, bull_points: float = .5, order: float = .5) -> :param order: float, order of cards parametrization :return: [Card ...] """ - seed(deck_size) + random.seed(deck_size) cards = [] for i in range(deck_size): - cards.append((i + 1, randrange(min_val, max_val))) - s = (order or random()) - shuffle(cards, lambda: s) + cards.append((i + 1, random.randint(min_val, max_val))) + random.shuffle(cards) return cards def create_stacks(self) -> (List[List[Tuple[int, int]]]): diff --git a/Benchmark/take5/untyped/dealer.py b/Benchmark/take5/untyped/dealer.py index 65495ad..34798e4 100644 --- a/Benchmark/take5/untyped/dealer.py +++ b/Benchmark/take5/untyped/dealer.py @@ -1,4 +1,4 @@ -from random import randrange, shuffle, random, seed +from random import randint, shuffle, random, seed from copy import deepcopy from player import Player @@ -58,14 +58,14 @@ def create_deck(self, deck_size, bull_points, order): :param order: float, order of cards parametrization :return: [Card ...] """ - seed(deck_size) + random.seed(deck_size) cards = [] for i in range(deck_size): - cards.append((i + 1, randrange(min_val, max_val))) - s = (order or random()) - shuffle(cards, lambda: s) + cards.append((i + 1, random.randint(min_val, max_val))) + random.shuffle(cards) return cards + def create_stacks(self): """ create 4 new stacks each having 1 card from the deck