diff --git a/gui.pl b/gui.pl index d2c4c2d..ea1f4ac 100644 --- a/gui.pl +++ b/gui.pl @@ -63,6 +63,7 @@ choose_units :- send(D, open). +%TODO delete change_cell_content(T, Row, Col, NewContent) :- get(T, cell, Row, Col, Cell), send(Cell, free), @@ -305,6 +306,7 @@ process_move_unit(FromX, FromY, ToX, ToY, Controls) :- update_controls, spielfeld. +%TODO delete test_change :- new(D, dialog), new(T, tabular), diff --git a/logik.pl b/logik.pl index f3527fa..ef4d9a2 100644 --- a/logik.pl +++ b/logik.pl @@ -115,8 +115,15 @@ einheit_action(Xold, Yold, Xnew, Ynew) :- einheit_attack(Xold, Yold, Xnew, Ynew) ), - end_turn,!. - + ( + current_player(Player), + player_tokens(Player, Tokens), + \+ Tokens > 0, + end_turn, + ! + ; + true + ). einheit_alive(AP, HP, HPnew, HPmult) :- % berechnen der differenz nach anwenden des multplikators