sztuczna_inteligencja_2023_.../city.py
2023-04-03 15:49:28 +02:00

33 lines
831 B
Python

from typing import List
from garbageCan import GarbageCan
from street import Street
from gameContext import GameContext
class Node:
garbageCan: GarbageCan
id: int
def __init__(self, id: int, can: GarbageCan) -> None:
self.id
self.can = can
class City:
nodes: List[Node]
streets: List[Street]
def __init__(self) -> None:
self.nodes = []
self.streets = []
def add_node(self, node: Node) -> None:
self.nodes.append(node)
def add_street(self, street: Street) -> None:
self.streets.append(street)
def render_city(self, game_context: GameContext) -> None:
self._render_streets(game_context)
def _render_streets(self, game_context: GameContext) -> None:
for street in self.streets:
street.render(game_context)