finished g_over visuals,fix logic bug in game_over
This commit is contained in:
parent
7aa0bef79d
commit
697b1e9c61
BIN
Winner.gif
BIN
Winner.gif
Binary file not shown.
Before Width: | Height: | Size: 31 KiB |
11
gui.pl
11
gui.pl
@ -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
|
||||||
|
9
logik.pl
9
logik.pl
@ -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,_,_,_,_)
|
!
|
||||||
).
|
).
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user