sztuczna_inteligencja_2023_.../speedBump.py

13 lines
444 B
Python
Raw Normal View History

2023-05-13 19:30:00 +02:00
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