From 923ae73b5eb42ffb3e1450852c842a6a2119652b Mon Sep 17 00:00:00 2001 From: Balazs Toldi Date: Thu, 19 May 2022 20:54:46 +0200 Subject: [PATCH] Victim life --- victim.asl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/victim.asl b/victim.asl index cb37cfe..8c9bae8 100644 --- a/victim.asl +++ b/victim.asl @@ -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.