|
|
@ -1 +1,24 @@ |
|
|
|
#include <stdbool.h> |
|
|
|
#include <stdio.h> |
|
|
|
#include "Moving.h" |
|
|
|
#include "Schachbrett.h" |
|
|
|
#include "Spieler.h" |
|
|
|
|
|
|
|
bool king_alive(char** brett) { |
|
|
|
bool white_king_found = false; |
|
|
|
bool black_king_found = false; |
|
|
|
|
|
|
|
for(int i = 0; i < 8; i++) { |
|
|
|
for(int j = 0; j < 8; j++) { |
|
|
|
if(brett[i][j] == 'K') { |
|
|
|
white_king_found = true; |
|
|
|
} else if(brett[i][j] == 'k') { |
|
|
|
black_king_found = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return white_king_found && black_king_found; |
|
|
|
} |
|
|
|
|
|
|
|
// Während der Laufzeit des Spiels neue Features hinzufügen |