summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chess.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/chess.c b/chess.c
index 92277dc..f5881fe 100644
--- a/chess.c
+++ b/chess.c
@@ -44,10 +44,12 @@ int main(int argc, char **argv) {
int checkmate = 0;
for(int i = 0; i < allMoves.length; i++) {
if(allMoves.vectorps[i].length > 0) {
- continue;
+ checkmate = 0;
+ break;
+ }
+ else {
+ checkmate = 1;
}
- checkmate = 1;
- break;
}
if(checkmate) {
printf("You've been checkmated!\n");