add occupied attrib
This commit is contained in:
parent
ab11faa24f
commit
a62b875d35
@ -3,6 +3,7 @@ from typing import Union
|
||||
from ap_mine import APMine
|
||||
from at_mine import ATMine
|
||||
from adm_mine import ADMMine
|
||||
from const import ROCK_INDEXES
|
||||
|
||||
|
||||
class Tile:
|
||||
@ -21,3 +22,4 @@ class Tile:
|
||||
self.visibility = visibility
|
||||
self.stability = stability
|
||||
self.ground = ground
|
||||
self.occupied = True if mine or number in ROCK_INDEXES else False
|
||||
|
@ -42,7 +42,7 @@ class TilesFactory:
|
||||
)
|
||||
|
||||
def get_tiles_list(self) -> List[Tile]:
|
||||
return [self.create_tile(i) for i in range(34)]
|
||||
return [self.create_tile(i) for i in range(26)]
|
||||
|
||||
def get_random_value(self, values):
|
||||
return choice(values)
|
||||
|
Loading…
Reference in New Issue
Block a user