Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Field(object):
- '''
- classdocs
- '''
- TRACK = 0
- CAR = 1
- WALL = 2
- FINISH = 3
- CHECKPOINT1 = 4
- CHECKPOINT2 = 5
- def __init__(self, width, height):
- '''
- Constructor
- '''
- self.height = height
- self.width = width
- self.field = [None] * height
- for i in range(height):
- self.field[i] = [None] * width
- def setstate(self, state, x, y):
- self.field[y][x] = state
- def getstate(self, x, y):
- return self.field[y][x]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement