Informatik10/maedn/Board.py

73 lines
1.5 KiB
Python
Raw Normal View History

import House
import Field
class Board(object):
""":version: 0.1
:author: Martin Putzlocher
"""
""" ATTRIBUTES
list_all_fields (private)
"""
def __init__(self, colors:list, number_of_players=4):
self.colors = colors
self.num_players = number_of_players
self._list_all_fields = list()
self.init_board()
def get_house_by_color(self, color = "black"):
"""Returns list of house fields of one color
:param string: color :
:param color: (Default value = "black")
:returns: House :
"""
pass
def init_board(self):
"""Initialize Board
:returns: author
"""
for n in range(self.num_players):
for i in range(10):
f = Field.Field(self, i, self.colors[n], house=False)
self._list_all_fields.append(f)
IDlist = [f.get_id() for f in self._list_all_fields]
print(IDlist)
def get_next_standard_field(self, current_field):
"""
:param Field: current_field :
:param current_field:
:returns: Field :
@author
"""
pass
def get_next_field_by_color(self, current_field, color = "black"):
"""
:param Field: current_field : Current field
:param string: color : Color of the stone requesting his next field.
:param current_field:
:param color: (Default value = "black")
:returns: Field :
@author
"""
curr_id = current_field.get_id()