summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 40bdba4..eaded89 100644
--- a/src/main.c
+++ b/src/main.c
@@ -175,10 +175,15 @@ int apply_move(int move[2], int* board) {
int origin = move[0];
int destination = move[1];
int piece = board[origin];
+ int target_piece = board[destination];
board[destination] = piece;
board[origin] = EMPTY;
+ if (target_piece != EMPTY) {
+ printf("Captured %s\n", pieces[target_piece]);
+ }
+
return board[destination];
}