예제 #1
0
 def __init__(self, start, board):
     width = 36
     obstacles = []
     obstacles.append(Pipe(start, 6, board))
     obstacles.append(Pipe(start + 30, 6, board))
     obstacles.append(Brick(Point(15, start + 9), Dimension(2, 7), board))
     obstacles.append(Brick(Point(15, start + 19), Dimension(2, 7), board))
     enemy = []
     enemy.append(BossEnemy(FLOOR - 3, start + 9, board))
     coin_row(Point(FLOOR - 1, start + 5), Dimension(1, 25), board)
     Hurdle.__init__(self, start, width, obstacles, enemy, board)
     self.load()
예제 #2
0
 def __init__(self, y, height, board):
     focus = Point(FLOOR - height, y)
     dimensions = Dimension(height, 7)
     pipe = IDENTIFIER['pipe']
     spring = IDENTIFIER['spring']
     shape = [[pipe, pipe, spring, spring, spring, pipe, pipe]] * height
     Obstacle.__init__(self, focus, shape, dimensions, board)
예제 #3
0
 def __init__(self, x, y, board):
     shape = [[MARIO_CHAR] * 3] * 3
     People.__init__(self, Point(x, y), 1, shape, Dimension(3, 3), board)
     self.state = 0
     self.air = 0
     self.board.mario = self
     self.update()
예제 #4
0
 def __init__(self, point, board):
     self.point = point
     self.shape = [[IDENTIFIER['coin']]]
     self.dimensions = Dimension(1, 1)
     self.board = board
     self.pre = []
     self.id = totalcoin
     self.store_coin(self.point)
     self.draw()
예제 #5
0
 def __init__(self, board):
     slash = IDENTIFIER['cloudSlash']
     backslash = IDENTIFIER['cloudBackSlash']
     space = IDENTIFIER['cloudSpace']
     temp = [space] * 10
     shape = [[slash, backslash] * 6, [backslash, *temp, slash],
              [slash, *temp, backslash], [backslash, slash] * 6]
     focus = Point(randint(0, 7), randint(4, board.breadth - 14))
     Nature.__init__(self, focus, Dimension(4, 12), shape, board)
예제 #6
0
 def __init__(self, start, board):
     width = 56
     obstacles = []
     obstacles.append(Brick(Point(19, start), Dimension(2, 5), board))
     obstacles.append(Brick(Point(15, start + 8), Dimension(2, 5), board))
     obstacles.append(Brick(Point(11, start + 16), Dimension(2, 5), board))
     obstacles.append(Brick(Point(5, start + 21), Dimension(2, 11), board))
     obstacles.append(Brick(Point(19, start + 21), Dimension(2, 11), board))
     obstacles.append(Valley(start + 18, 17, board))
     obstacles.append(Brick(Point(11, start + 32), Dimension(2, 5), board))
     obstacles.append(Brick(Point(15, start + 40), Dimension(2, 5), board))
     obstacles.append(Brick(Point(19, start + 48), Dimension(2, 5), board))
     coin_row(Point(4, start + 21), Dimension(1, 11), board)
     Hurdle.__init__(self, start, width, obstacles, [], board)
     self.load()
예제 #7
0
 def __init__(self, start, board):
     width = 26
     obstacles = []
     obstacles.append(Spring(start + 3, 6, board))
     coin_row(Point(8, start + 6), Dimension(10, 1), board)
     enemy = []
     enemy.append(SlaveEnemy(FLOOR - 2, start, board))
     enemy.append(SlaveEnemy(FLOOR - 2, start + 13, board))
     Hurdle.__init__(self, start, width, obstacles, enemy, board)
     self.load()
예제 #8
0
 def __init__(self, board):
     slash = IDENTIFIER['bushSlash']
     backslash = IDENTIFIER['bushBackSlash']
     space = IDENTIFIER['bushSpace']
     pipe = IDENTIFIER['bushPipe']
     temp = [space] * 10
     shape = [[slash, backslash] * 6, [pipe, *temp, pipe],
              [pipe, *temp, pipe]]
     focus = Point(FLOOR - 3, randint(2, board.breadth - 14))
     Nature.__init__(self, focus, Dimension(3, 12), shape, board)
예제 #9
0
 def shooter(self):
     '''Mario on 3 rd stage'''
     self.shape = [[MARIO_CHAR]*4]*4
     self.dimensions = Dimension(4, 4)
     self.state = 2
예제 #10
0
 def depricate(self):
     '''On getting kicked'''
     self.shape = [[MARIO_CHAR]*3]*3
     self.dimensions = Dimension(3, 3)
     self.state = 0
예제 #11
0
 def grow(self):
     '''On eating of weeds'''
     self.shape = [[MARIO_CHAR]*4]*4
     self.dimensions = Dimension(4, 4)
     self.state = 1
예제 #12
0
 def __init__(self, start, breadth, board):
     dimensions = Dimension(5, breadth)
     shape = [list([IDENTIFIER['valley']] * dimensions.breadth)
              ] * dimensions.length
     Obstacle.__init__(self, Point(FLOOR, start), shape, dimensions, board)
예제 #13
0
 def __init__(self, y, height, board):
     focus = Point(FLOOR - height, y)
     dimensions = Dimension(height, 5)
     shape = [list([IDENTIFIER['pipe']] * 5)] * height
     Obstacle.__init__(self, focus, shape, dimensions, board)
예제 #14
0
 def __init__(self, y, board):
     dimensions = Dimension(15, 30)
     focus = Point(FLOOR - dimensions.length, y)
     shape = CASTLE_SHAPE
     Obstacle.__init__(self, focus, shape, dimensions, board)
     self.draw()
예제 #15
0
 def __init__(self, board):
     shape = []
     focus = Point(FLOOR + 4, randint(5, board.breadth - 5))
     Nature.__init__(self, focus, Dimension(4, 12), shape, board)
예제 #16
0
 def __init__(self, x, y, board):
     ch = IDENTIFIER['SlaveEnemy']
     shape = [[ch, ch], [ch, ch]]
     board.all_enemies.append(self)
     People.__init__(self, Point(x, y), 1, shape, Dimension(2, 2), board)