Board.TiledBoard

TiledBoard is a child class of Board

classDiagram Board <|-- PixelBoard Board <|-- TiledBoard class Board{ } class PixelBoard{ } class TiledBoard{ }

TiledBoard

class miniworldmaker.boards.tiled_board.TiledBoard(*args, **kwargs)[source]
__init__(columns: int = 20, rows: int = 16, tile_size=42, tile_margin=0, background_image=None)[source]

Initializes the TiledBoard

Parameters
  • columns – The number of columns

  • rows – The number of rows

  • tile_size – The size of a tile

  • tile_margin – The margin between tiles

borders(value: Union[tuple, miniworldmaker.board_positions.board_position.BoardPosition, miniworldmaker.board_positions.board_rect.BoardRect])list[source]
Parameters

value

Returns:

static get_neighbour_cells(position: tuple)list[source]

Gets a list of all neighbour cells

Parameters

position – the position

Returns

a list of all neighbour cells

on_board(value: Union[tuple, miniworldmaker.board_positions.board_position.BoardPosition, miniworldmaker.board_positions.board_rect.BoardRect])bool[source]

Checks if position is on board

Parameters

value – A Board Position or a board rect

Returns: