13 lines
444 B
Python
13 lines
444 B
Python
|
from typing import List, Tuple
|
||
|
from gameContext import GameContext
|
||
|
from gridCellType import GridCellType
|
||
|
|
||
|
class SpeedBump:
|
||
|
position: Tuple[int, int]
|
||
|
|
||
|
def __init__(self, position: Tuple[int, int]) -> None:
|
||
|
self.position = position
|
||
|
|
||
|
def render(self, game_context: GameContext) -> None:
|
||
|
game_context.render_in_cell(self.position, "imgs/speed_bump.png")
|
||
|
game_context.grid[self.position] = GridCellType.SPEED_BUMP
|