add occupied attrib

This commit is contained in:
matixezor 2021-06-01 22:51:44 +02:00
parent ab11faa24f
commit a62b875d35
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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)