From 5a9a8100a5621d581c84b20a4985225c62263ecd Mon Sep 17 00:00:00 2001 From: xxsoca Date: Fri, 23 Jun 2023 15:57:06 +0200 Subject: [PATCH] fix logic game over --- logik.pl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 :-