diff --git a/logik.pl b/logik.pl index b705f30..0682deb 100644 --- a/logik.pl +++ b/logik.pl @@ -28,4 +28,9 @@ einheit_move(Player, Xold, Yold, Xmove, Ymove) :- Ynew is Yold + Ymove, % Die Einheit an die neue Position setzen - assert( einheit_active(Player, Type, Xnew, Ynew) ). \ No newline at end of file + assert( einheit_active(Player, Type, Xnew, Ynew) ), + + % Errechnen der verbleibenden Tokens + retract( player_tokens(Player, Tokens) ), + TokensNew is Tokens - Xmove - Ymove, + assert( player_tokens(Player, TokensNew) ). \ No newline at end of file