c23 standard switch case issues
This commit is contained in:
parent
5ed3450d6f
commit
cbf4f6bdcd
2 changed files with 2 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ void do_moving(void) {
|
||||||
switch (state->moving_type) {
|
switch (state->moving_type) {
|
||||||
case LeftDown:
|
case LeftDown:
|
||||||
case RightDown:
|
case RightDown:
|
||||||
case Rotate:
|
case (Rotate): {
|
||||||
Figure_t old = state->curr;
|
Figure_t old = state->curr;
|
||||||
switch (state->moving_type) {
|
switch (state->moving_type) {
|
||||||
case LeftDown:
|
case LeftDown:
|
||||||
|
|
@ -30,7 +30,7 @@ void do_moving(void) {
|
||||||
}
|
}
|
||||||
state->state = Move;
|
state->state = Move;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case ToDown:
|
case ToDown:
|
||||||
while (!check_collision()) {
|
while (!check_collision()) {
|
||||||
state->curr.y++;
|
state->curr.y++;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#include <time.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "../../brick_game/tetris/00_tetris.h"
|
#include "../../brick_game/tetris/00_tetris.h"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue