Last active
October 29, 2021 01:05
-
-
Save behrouz-bakhtiari/7c4ed77cab5ce863f79543b55f9da0a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def game_run(): | |
fell = [] | |
panes = [random.choice([[0,1], [1,0]]) for i in range(num_steps)] # 0 for breakable, 1 for solid | |
for i in range(num_players): | |
steps = [random.randint(0,1) for j in range(num_steps)] # 0 for left, 1 for right | |
for j in range(num_steps): | |
if panes[j][steps[j]] == 1: | |
panes[j] = [1, 1] | |
else: | |
panes[j] = [1, 1] | |
fell.append(i) | |
break | |
return fell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment