-
Notifications
You must be signed in to change notification settings - Fork 0
Blocks
This Object contains some methods to wrap the differnet kind of Tetris blocks onto a two-dimensional array, given a start coordinate. The colors for each block are hardcoded. The blocks will rotate clockwise around a fixed point as described in following image:
Arguments: x -> X-Position of start-pixel, y -> Y-Position of start-pixel.
This rethod will calculate the form for the desired block and return it together with its color.
returns a tuple consisting of an array of positions, which describe the blocks pixels in relation to given (x, y)-position and a predefined color.
Arguments: x -> X-Position of start-pixel, y -> Y-Position of start-pixel.
This rethod will calculate the form for the desired block and return it together with its color.
returns a tuple consisting of an array of positions, which describe the blocks pixels in relation to given (x, y)-position and a predefined color.
Arguments: x -> X-Position of start-pixel, y -> Y-Position of start-pixel.
This rethod will calculate the form for the desired block and return it together with its color.
returns a tuple consisting of an array of positions, which describe the blocks pixels in relation to given (x, y)-position and a predefined color.
Arguments: x -> X-Position of start-pixel, y -> Y-Position of start-pixel.
This rethod will calculate the form for the desired block and return it together with its color.
returns a tuple consisting of an array of positions, which describe the blocks pixels in relation to given (x, y)-position and a predefined color.
Arguments: x -> X-Position of start-pixel, y -> Y-Position of start-pixel.
This rethod will calculate the form for the desired block and return it together with its color.
returns a tuple consisting of an array of positions, which describe the blocks pixels in relation to given (x, y)-position and a predefined color.
There will also be a turn-method for turning the blocks.
