Add seed number (not well tested)
This commit is contained in:
parent
767789458c
commit
47cb202181
1 changed files with 6 additions and 3 deletions
|
@ -177,10 +177,13 @@ def draw_tree(t):
|
||||||
|
|
||||||
|
|
||||||
# init random
|
# init random
|
||||||
# TODO add seed mode (how ?)
|
seed = random.randint(0, sys.maxsize)
|
||||||
random.seed()
|
print("Using seed: " + str(seed))
|
||||||
|
random.seed(seed)
|
||||||
|
|
||||||
label = pyglet.text.Label('Plop World', x=window.width*5/6, y=window.height*5/6, anchor_x='center', anchor_y='center')
|
label_txt = 'Plop World seed: ' + str(seed)
|
||||||
|
label = pyglet.text.Label(label_txt, x=window.width*5/6, y=window.height*5/6, anchor_x='center', anchor_y='center',
|
||||||
|
multiline=True, width=window.width - window.width*5/6)
|
||||||
|
|
||||||
# load images
|
# load images
|
||||||
tiles = []
|
tiles = []
|
||||||
|
|
Loading…
Reference in a new issue