engine.board documentation - wladekpal/The-Lazy-Snek GitHub Wiki
engine.board.Board
Class represents the board, which is the container for the fields in the level.
Properties
fields- matrix that consists of fieldsstate- infromation about state of level (unused right now)
constructor
Constructor method takes a matrix of fields. If height or width of matrix is of non-positive value WrongMatrix is raised.
self_draw(frame)
Divides the frame equally between every field. Executes self_draw method on every field, by passing them upper-left corner coordinates and size of the field side. If size of field is less than 1 pixel ImpossibleToDraw is raised.
request_field(position)
Returns the field that is under the position, which is the pair (x, y). If value of x or y is out of range OutOfRange is raised. If under pair (x, y) is None, then NotExisitingField is raised.