introduce next shape
This commit is contained in:
parent
5c03232855
commit
f524a08687
@ -350,15 +350,16 @@ const orientation_t nextOrientation[5][4] = { // 5 = number of directions to mov
|
||||
};
|
||||
|
||||
stone_t stone;
|
||||
shape_t nextShape;
|
||||
|
||||
void shapesInit() {
|
||||
stone.shape = e_ShapeInvalid;
|
||||
nextShape = e_Z;
|
||||
}
|
||||
|
||||
void stoneCreate() {
|
||||
uint16_t n = myRandGet();
|
||||
uint8_t m = n % 7;
|
||||
stone.shape = ((shape_t[]){ e_I, e_O, e_T, e_Z, e_S, e_L, e_J })[m];
|
||||
stone.shape = nextShape;
|
||||
nextShape = ((shape_t[]){ e_I, e_O, e_T, e_Z, e_S, e_L, e_J })[myRandGet() % e_ShapeInvalid];
|
||||
stone.orientation = e_0;
|
||||
stone.x = 5;
|
||||
stone.y = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user