diff --git a/Winner.gif b/Winner.gif deleted file mode 100644 index 1ca0144..0000000 Binary files a/Winner.gif and /dev/null differ diff --git a/gui.pl b/gui.pl index b6fd665..45926df 100644 --- a/gui.pl +++ b/gui.pl @@ -320,14 +320,15 @@ process_end_turn :- game_over_gui(Winner) :- game_control(C), game_window(D), - send(C, destroy), - send(D, destroy), new(G, dialog('Winner')), - new(I, image('Winner.gif')), + new(I, image('win.jpg')), new(B, bitmap(I)), send(G, display, B), - send(G, append, new(Label, label(name, Winner))), - send(G, open). + atomic_list_concat(['Player ', Winner, ' wins!'], String_result), + send(G, append, new(Label, label(name, String_result))), + send(G, open), + send(C, destroy), + send(D, destroy). %TODO delete diff --git a/logik.pl b/logik.pl index c4b8c4d..b206327 100644 --- a/logik.pl +++ b/logik.pl @@ -174,11 +174,12 @@ change_player :- game_over(Winner) :- ( current_player(Winner), - \+ einheit_active(Winner,_,_,_,_) - ), !; - ( + inactive_player(Loser), + \+ einheit_active(Loser,_,_,_,_), + ! + ; inactive_player(Winner), - \+ einheit_active(Winner,_,_,_,_) + ! ). diff --git a/win.jpg b/win.jpg new file mode 100644 index 0000000..a6e00c1 Binary files /dev/null and b/win.jpg differ