How to have gradiented pixels in a matlab tetris game?

61 Views Asked by At

Im currently trying to create a tetris game on matlab, and its going quite well so far. However having looked at other code of similar attempts online, they all seem to have pixels that are gradiented in some way to define each block within the four blocks that make up a tetrino. Im unsure how to define an outline for each block in my code or add any sort of gradient as currently an entire shape is the shape colour as opposed to each pixel being gradiented or outlined. Any help would be appreciated.

Im currently using an array to assign the shape of the tetrinos and an rgb matrix with 0's and 1's for the associated colours. i.e [0 0 1] for an entirely blue shape.

Ive seen a few codes using patches but i havent looked into these too much as my work needs to be original so i dont just want to copy another code. Im unsure if you can even assign multiple colours to one pixel...

0

There are 0 best solutions below