Victim life
This commit is contained in:
parent
3b463807ea
commit
923ae73b5e
1 changed files with 4 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue