Skip to content

Commit

Permalink
honor seed=0 by checking if seed is none instead of using or operator (
Browse files Browse the repository at this point in the history
…#254)

Co-authored-by: Fernando Yordan <fernando@Fernandos-MacBook-Pro.local>
  • Loading branch information
fyordan and Fernando Yordan authored Mar 31, 2023
1 parent 2cc9a9a commit 0dc495c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion catanatron_core/catanatron/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(
initialize (bool, optional): Whether to initialize. Defaults to True.
"""
if initialize:
self.seed = seed or random.randrange(sys.maxsize)
self.seed = seed if seed is not None else random.randrange(sys.maxsize)
random.seed(self.seed)

self.id = str(uuid.uuid4())
Expand Down

0 comments on commit 0dc495c

Please sign in to comment.