rename field to tile
This commit is contained in:
parent
d6caa9aad9
commit
e84a93580e
@ -1,16 +1,16 @@
|
||||
from typing import List
|
||||
from random import choices
|
||||
|
||||
from field import Field
|
||||
from fieldsFactory import FieldsFactory
|
||||
from tile import Tile
|
||||
from tilesFactory import TilesFactory
|
||||
|
||||
|
||||
def generate_field () -> List[List[Field]]:
|
||||
fields_factory = FieldsFactory()
|
||||
fields_list = fields_factory.get_fields_list()
|
||||
return [choices(fields_list, weights=[10, 10, 4, 4, 4, 4, 4, 4, 4, 4, 4], k=10) for _ in range(10)]
|
||||
def generate_field() -> List[List[Tile]]:
|
||||
tiles_factory = TilesFactory()
|
||||
tiles_list = tiles_factory.get_tiles_list()
|
||||
return [choices(tiles_list, weights=[10, 10, 4, 4, 4, 4, 4, 4, 4, 4, 4], k=10) for _ in range(10)]
|
||||
|
||||
|
||||
class Environment:
|
||||
def __init__(self, field: List[List[Field]] = None):
|
||||
def __init__(self, field: List[List[Tile]] = None):
|
||||
self.field = field if field else generate_field()
|
||||
|
Loading…
Reference in New Issue
Block a user