add parameters for decision tree
This commit is contained in:
parent
5560d6687d
commit
13ccc6c184
10
src/adm_mine.py
Normal file
10
src/adm_mine.py
Normal file
@ -0,0 +1,10 @@
|
||||
from typing import Union
|
||||
|
||||
from mine import Mine
|
||||
|
||||
|
||||
class ADMMine(Mine):
|
||||
mine_type = 'ADM'
|
||||
|
||||
def __init__(self, pressure: Union[float, int], armed: bool = True):
|
||||
super().__init__(pressure, armed)
|
@ -1,8 +1,10 @@
|
||||
from typing import Union
|
||||
|
||||
from mine import Mine
|
||||
|
||||
|
||||
class APMine(Mine):
|
||||
defuse_method = 2
|
||||
mine_type = 'AP'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, pressure: Union[float, int], armed: bool = True):
|
||||
super().__init__(pressure, armed)
|
||||
|
@ -1,8 +1,10 @@
|
||||
from typing import Union
|
||||
|
||||
from mine import Mine
|
||||
|
||||
|
||||
class ATMine(Mine):
|
||||
defuse_method = 1
|
||||
mine_type = 'AT'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, pressure: Union[float, int], armed: bool = True):
|
||||
super().__init__(pressure, armed)
|
||||
|
@ -1,3 +1,7 @@
|
||||
from typing import Union
|
||||
|
||||
|
||||
class Mine:
|
||||
def __init__(self, is_armed: bool = True):
|
||||
self.is_armed = is_armed
|
||||
def __init__(self, pressure: Union[float, int], armed: bool):
|
||||
self.is_armed = armed
|
||||
self.pressure = pressure
|
||||
|
@ -5,7 +5,10 @@ from at_mine import ATMine
|
||||
|
||||
|
||||
class Tile:
|
||||
def __init__(self, number: int, weight: int, mine: Union[None, APMine, ATMine] = None):
|
||||
def __init__(self, number: int, weight: int, visibility, stability, ground, mine: Union[None, APMine, ATMine] = None):
|
||||
self.number = number
|
||||
self.mine = mine
|
||||
self.weight = weight
|
||||
self.visibility = visibility
|
||||
self.stability = stability
|
||||
self.ground = ground
|
||||
|
Loading…
Reference in New Issue
Block a user