mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-09-13 22:44:00 +02:00
fix mismatching signatures of spawn
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import Union, List, Tuple
|
||||
|
||||
from marl_factory_grid.environment.groups.collection import Collection
|
||||
|
||||
from .entitites import Machine
|
||||
@@ -21,3 +23,4 @@ class Machines(Collection):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Machines, self).__init__(*args, **kwargs)
|
||||
|
||||
|
@@ -13,8 +13,7 @@ class MachineRule(Rule):
|
||||
self.n_machines = n_machines
|
||||
|
||||
def on_init(self, state, lvl_map):
|
||||
# TODO Move to spawn!!!
|
||||
state[m.MACHINES].add_items(Machine(pos) for pos in state.entities.empty_positions())
|
||||
state[m.MACHINES].spawn(state.entities.empty_positions())
|
||||
|
||||
def tick_pre_step(self, state) -> List[TickResult]:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user