finished g_over visuals,fix logic bug in game_over

This commit is contained in:
xxsoca 2023-06-23 15:44:53 +02:00
parent 7aa0bef79d
commit 697b1e9c61
4 changed files with 11 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

11
gui.pl
View File

@ -320,14 +320,15 @@ process_end_turn :-
game_over_gui(Winner) :- game_over_gui(Winner) :-
game_control(C), game_control(C),
game_window(D), game_window(D),
send(C, destroy),
send(D, destroy),
new(G, dialog('Winner')), new(G, dialog('Winner')),
new(I, image('Winner.gif')), new(I, image('win.jpg')),
new(B, bitmap(I)), new(B, bitmap(I)),
send(G, display, B), send(G, display, B),
send(G, append, new(Label, label(name, Winner))), atomic_list_concat(['Player ', Winner, ' wins!'], String_result),
send(G, open). send(G, append, new(Label, label(name, String_result))),
send(G, open),
send(C, destroy),
send(D, destroy).
%TODO delete %TODO delete

View File

@ -174,11 +174,12 @@ change_player :-
game_over(Winner) :- game_over(Winner) :-
( (
current_player(Winner), current_player(Winner),
\+ einheit_active(Winner,_,_,_,_) inactive_player(Loser),
), !; \+ einheit_active(Loser,_,_,_,_),
( !
;
inactive_player(Winner), inactive_player(Winner),
\+ einheit_active(Winner,_,_,_,_) !
). ).

BIN
win.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB