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