I can't figure out a code that fills trapezium with tiles.
To do a rectangle is easy because the x and y starts from 0:
for(int y=0; y<10; y++){
for(int x=0; x<10; x++){
//create a tile at (x ; y)
}
}
And it renders like this - photo
But in trapezium the x and y is changing every line - photo
How to create x, y loops so they fill like in the 2nd photo?