|
@ -105,14 +105,14 @@ def tick(t): |
|
|
man.curr = nextSquare(man, grid) |
|
|
man.curr = nextSquare(man, grid) |
|
|
grid[cp[0]][cp[1]].occupant = None #they move out of there |
|
|
grid[cp[0]][cp[1]].occupant = None #they move out of there |
|
|
grid[man.curr[0]][man.curr[1]].occupant = i |
|
|
grid[man.curr[0]][man.curr[1]].occupant = i |
|
|
if done: |
|
|
if done and toad >= len(passengers): |
|
|
print("Final Tick: " + str(t)); |
|
|
print("Final Tick: " + str(t)); |
|
|
exit() |
|
|
exit() |
|
|
|
|
|
|
|
|
def run(): |
|
|
def run(): |
|
|
t = 0 |
|
|
t = 0 |
|
|
while 1: |
|
|
while 1: |
|
|
t += 1 |
|
|
|
|
|
tick(t) |
|
|
tick(t) |
|
|
|
|
|
t += 1 |
|
|
|
|
|
|
|
|
run() |
|
|
run() |
|
|