mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-09-18 00:21:58 +02:00
WIP: removing tiles
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import random
|
||||
from typing import List
|
||||
from typing import List, Tuple
|
||||
|
||||
from marl_factory_grid.environment.entity.entity import Entity
|
||||
from marl_factory_grid.environment.entity.object import Object
|
||||
@@ -14,12 +14,12 @@ class Zone(Object):
|
||||
|
||||
@property
|
||||
def positions(self):
|
||||
return [x.pos for x in self.tiles]
|
||||
return self.coords
|
||||
|
||||
def __init__(self, tiles: List[Floor], *args, **kwargs):
|
||||
def __init__(self, coords: List[Tuple[(int, int)]], *args, **kwargs):
|
||||
super(Zone, self).__init__(*args, **kwargs)
|
||||
self.tiles = tiles
|
||||
self.coords = coords
|
||||
|
||||
@property
|
||||
def random_tile(self):
|
||||
return random.choice(self.tiles)
|
||||
return random.choice(self.coords)
|
||||
|
Reference in New Issue
Block a user