fix logic game over

This commit is contained in:
xxsoca 2023-06-23 15:57:06 +02:00
parent 697b1e9c61
commit 5a9a8100a5

View File

@ -174,15 +174,15 @@ change_player :-
game_over(Winner) :- game_over(Winner) :-
( (
current_player(Winner), current_player(Winner),
inactive_player(Loser), \+ einheit_active(Winner,_,_,_,_)
\+ einheit_active(Loser,_,_,_,_), ), !;
! (
;
inactive_player(Winner), inactive_player(Winner),
! \+ einheit_active(Winner,_,_,_,_)
). ).
% Falls das Spiel vorbei ist, mach nix % Falls das Spiel vorbei ist, mach nix
end_turn :- end_turn :-
game_over(Winner), game_over(Winner),
@ -191,7 +191,8 @@ end_turn :-
write("Player "), write("Player "),
write(Winner), write(Winner),
write(" wins!"). write(" wins!"),
reset_game.
% Beendet den Aktuellen Zug des Spielers % Beendet den Aktuellen Zug des Spielers
end_turn :- end_turn :-