Browse Source

YEAHgit pull

master
e-dt 3 years ago
parent
commit
c87f1ef0ad
  1. 11
      main.py

11
main.py

@ -77,15 +77,18 @@ import random
random.seed(505)
random.shuffle(passengers)
toad = 0
btime = 10 #passengers board every btime ticks
import os
def nunty(x):
if x is None: return -1
return x
def tick():
def tick(t):
done=True
global toad
global btime
# print grid
for row in grid:
for guy in row:
@ -98,7 +101,7 @@ def tick():
print()
print("---")
print(grid[3][0].occupant, grid[3][1].occupant, passengers[nunty(grid[3][1].occupant)].dest)
if toad < len(passengers) and grid[3][0].occupant is None:
if toad < len(passengers) and grid[3][0].occupant is None and t % btime == 0:
grid[3][0].occupant = toad #added
passengers[toad].curr = (3, 0)
toad += 1
@ -124,7 +127,9 @@ def tick():
exit()
def run():
t = 0
while 1:
tick()
tick(t)
t += 1
run()

Loading…
Cancel
Save