Remove implicit fallthrough
This commit is contained in:
5
chess.c
5
chess.c
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user