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(columns=20, rows=16, tile_size=42, tile_margin=0, background_image=None)[source]
__init__(columns=20, rows=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)[source]
Parameters

value

Returns:

Return type

list

static get_neighbour_cells(position)[source]

Gets a list of all neighbour cells

Parameters

position – the position

Returns

a list of all neighbour cells

Return type

list

is_position_on_board(value)[source]

Checks if position is on board

Parameters

value – A Board Position or a board rect

Returns:

Return type

bool