Browse Source

Merge branch 'master' of https://git.e-dt.xyz/e-dt/bodice

master
e-dt 3 years ago
parent
commit
d4d0017fce
  1. 7
      main.py

7
main.py

@ -5,6 +5,9 @@ class SquareType(Enum):
SEAT = 1 SEAT = 1
height=7
width=33
class GridSquare: class GridSquare:
def __init__(self, typ, occupant): def __init__(self, typ, occupant):
self.typ = typ self.typ = typ
@ -17,8 +20,6 @@ class GridSquare:
def makeGrid(height, width): def makeGrid(height, width):
return [[GridSquare(SquareType.AISLE, None) for x in range(0,width)] for y in range(0,height)] return [[GridSquare(SquareType.AISLE, None) for x in range(0,width)] for y in range(0,height)]
grid=makeGrid(7,33)
class Passenger: class Passenger:
#dest and curr are both 2-tuples #dest and curr are both 2-tuples
def __init__(self, dest, curr): def __init__(self, dest, curr):
@ -46,6 +47,8 @@ def nextSquare(passenger, grid):
def GenPassList(): def GenPassList():
return [] return []
grid=makeGrid()
passengers = GenPassList() passengers = GenPassList()
for index, i in enumerate(passengers): for index, i in enumerate(passengers):
grid[i.curr[0]][i.curr[1]] = index grid[i.curr[0]][i.curr[1]] = index

Loading…
Cancel
Save