|
|
@ -3,6 +3,7 @@ |
|
|
|
#include "Moving.h" |
|
|
|
#include "Schachbrett.h" |
|
|
|
#include "Spieler.h" |
|
|
|
#include "Tutorial.h" |
|
|
|
|
|
|
|
bool king_alive(char** brett) { |
|
|
|
bool white_king_found = false; |
|
|
@ -23,6 +24,13 @@ bool king_alive(char** brett) { |
|
|
|
// Züge von jedem Spieler zählen, bis der König besiegt wurde |
|
|
|
void anzahl_Zuege(char** brett, Player player) { |
|
|
|
int count_WHITE = 0, count_BLACK = 0; |
|
|
|
if (count_BLACK == 0 ){ |
|
|
|
nach_Tutorial_fragen(count_BLACK); |
|
|
|
} |
|
|
|
if (count_WHITE == 0){ |
|
|
|
nach_Tutorial_fragen(count_WHITE); |
|
|
|
}else{ |
|
|
|
|
|
|
|
if(king_alive(brett)) { |
|
|
|
if (player == PLAYER_WHITE){ |
|
|
|
count_WHITE++; |
|
|
@ -32,8 +40,14 @@ void anzahl_Zuege(char** brett, Player player) { |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
printf("Player White took %d moves, and Player Black took %d moves!\n"); |
|
|
|
printf("Spieler Weiß hat %d Züge gebraucht und Spieler Schwarz %d!\n"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// Während der Laufzeit des Spiels neue Features hinzufügen |