Remove implicit fallthrough

This commit is contained in:
olemorud
2023-03-16 17:25:45 +01:00
committed by Ole Morud
parent 3a8389dc4d
commit 94f8c0ca42

View File

@@ -222,6 +222,10 @@ int is_valid(int* board, const int from, const int to, const int player){
printf("attempting to move %lc to %lc\t%i", 0x2659 + board[from], 0x2659 + board[to], movedelta); printf("attempting to move %lc to %lc\t%i", 0x2659 + board[from], 0x2659 + board[to], movedelta);
switch(board[from]){ switch(board[from]){
default:
return 0;
break;
// PAWNS // PAWNS
case P: case -P: case P: case -P:
switch(movedelta){ switch(movedelta){
@@ -246,7 +250,6 @@ int is_valid(int* board, const int from, const int to, const int player){
} }
// the remaining pieces are left as an exercise for the reader // the remaining pieces are left as an exercise for the reader
default: return 0;
} }
return 0; return 0;