fix logic game over
This commit is contained in:
parent
697b1e9c61
commit
5a9a8100a5
13
logik.pl
13
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 :-
|
||||
|
Loading…
x
Reference in New Issue
Block a user