Victim life

This commit is contained in:
Balazs Toldi 2022-05-19 20:54:46 +02:00
parent 3b463807ea
commit 923ae73b5e
Signed by: Bazsalanszky
GPG key ID: 6C7D440036F99D58

View file

@ -12,8 +12,11 @@ life(500).
+!send_init_pos : not pos(_,_) // if I do not know my position yet
<- .wait("+pos(X,Y)", 500); // wait for it and try again
!!send_init_pos(S).
+free : pos(AgX,AgY) & life > 0
+free : pos(AgX,AgY) & life(L) > 0
<-
victim.get_direction(AgX, AgY, D);
do(D);
-+life(L-1);
.wait("",500);
-+free.