|
|
@ -1,14 +1,15 @@ |
|
|
|
#!/usr/bin/env python3 |
|
|
|
import random as rnd |
|
|
|
from enum import Enum |
|
|
|
class SquareType(Enum): |
|
|
|
AISLE = 0 |
|
|
|
SEAT = 1 |
|
|
|
|
|
|
|
|
|
|
|
height=7 |
|
|
|
width=33 |
|
|
|
width=32 |
|
|
|
|
|
|
|
class GridSquare: |
|
|
|
#typ: SquareType, occupant: index |
|
|
|
def __init__(self, typ, occupant): |
|
|
|
self.typ = typ |
|
|
|
self.occupant = occupant |
|
|
@ -35,14 +36,17 @@ def nextSquare(passenger, grid): |
|
|
|
for i in |
|
|
|
|
|
|
|
def GenPassList(): |
|
|
|
return [] |
|
|
|
border = [Passenger((0, a),(-1,-1)) for a in range(0,3)] |
|
|
|
for x in range(1,width): |
|
|
|
border.append([Passenger((x, a),(-1,-1)) for a in range(0,3)]) |
|
|
|
border.append([Passenger((x, a),(-1,-1)) for a in range(4,7)]) |
|
|
|
return border |
|
|
|
|
|
|
|
grid=makeGrid() |
|
|
|
|
|
|
|
#boarding order |
|
|
|
passengers = GenPassList() |
|
|
|
|
|
|
|
def tick(): |
|
|
|
# print grid |
|
|
|
print(grid) |
|
|
|
|
|
|
|
|
|
|
|