T, move left fixed

This commit is contained in:
Wolfgang Hottgenroth 2024-03-19 21:19:34 +01:00
parent 7f6d027d1a
commit a28cdcf6af
2 changed files with 12 additions and 9 deletions

View File

@ -62,6 +62,6 @@ void gameExec(void *handle) {
}
void gameInit() {
schAdd(gameExec, NULL, 0, 10000);
schAdd(gameExec, NULL, 0, 5000);
}

View File

@ -142,9 +142,9 @@ const motionTable_t motions[3] = { // size = number of implemented stones
{
// move left
{ .set = { {-1, 0}, { 0, 1}, { 0, 1}, { 0, 1} }, .reset = { { 1, 1}, { 2, 0}, { 2, 0}, { 2, 0} }, .offset = {-1, 0} }, // 0
{ .set = { {-1, 0}, {-1, 1}, {-1, 2}, {-1, 2} }, .reset = { { 0, 0}, { 0, 2}, { 0, 2}, { 0, 2} }, .offset = {-1, 0} }, // 90
{ .set = { { 0, 0}, {-1, 1}, { 0, 2}, { 0, 2} }, .reset = { { 1, 0}, { 1, 1}, { 1, 2}, { 1, 2} }, .offset = {-1, 0} }, // 90
{ .set = { {-1, 1}, { 0, 0}, { 0, 0}, { 0, 0} }, .reset = { { 1, 0}, { 2, 1}, { 2, 1}, { 2, 1} }, .offset = {-1, 0} }, // 180
{ .set = { {-1, 0}, {-1, 2}, {-2, 1}, {-2, 1} }, .reset = { { 0, 0}, { 0, 1}, { 0, 2}, { 0, 2} }, .offset = {-1, 0} }, // 270
{ .set = { {-1, 0}, {-1, 1}, {-1, 2}, {-1, 2} }, .reset = { { 0, 0}, { 0, 2}, { 1, 1}, { 1, 1} }, .offset = {-1, 0} }, // 270
},
{
// move right
@ -186,13 +186,16 @@ void shapesInit() {
}
void stoneCreate() {
// static uint8_t cnt = 0;
// stone.shape = ((shape_t[]){ e_I, e_O, e_T, e_Z, e_S, e_L, e_J })[cnt];
// cnt++;
// if (cnt > 2) {
// cnt = 0;
// }
#if 0
static uint8_t cnt = 0;
stone.shape = ((shape_t[]){ e_I, e_O, e_T, e_Z, e_S, e_L, e_J })[cnt];
cnt++;
if (cnt > 2) {
cnt = 0;
}
#else
stone.shape = e_T;
#endif
stone.orientation = e_0;
stone.x = 5;
stone.y = 0;