2022-04-19 07:49:45 +00:00
|
|
|
from Field import *
|
|
|
|
|
|
|
|
class House():
|
|
|
|
|
|
|
|
""":version: 0.1
|
|
|
|
:author: Martin Putzlocher
|
2022-04-04 06:16:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2022-04-14 20:48:16 +00:00
|
|
|
""" ATTRIBUTES
|
|
|
|
|
|
|
|
is_full (private)
|
|
|
|
|
|
|
|
list_of_fields (private)
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2022-04-19 07:49:45 +00:00
|
|
|
def __init__(self, board:Board=None, color:str="black"):
|
|
|
|
self.board = board
|
|
|
|
self.color = color
|
|
|
|
self._list_of_housefields = list()
|
|
|
|
|
|
|
|
if board is None:
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
self.init_house()
|
2022-04-04 06:16:33 +00:00
|
|
|
|
2022-04-19 07:49:45 +00:00
|
|
|
def set_board(self, board:Board=None):
|
|
|
|
self.board = board
|
|
|
|
return True
|
2022-04-04 06:16:33 +00:00
|
|
|
|
2022-04-19 07:49:45 +00:00
|
|
|
def init_house(self):
|
|
|
|
for i in range(4):
|
|
|
|
f = Field(board=self.board)
|