sztuczna_inteligencja_2023_.../speedBump.py
Wiktor Szynaka af42c84186 speed bumps
2023-05-13 19:30:00 +02:00

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