Skip to content

Commit

Permalink
remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Nov 2, 2024
1 parent b837a19 commit c8e6dd3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions data/scenarios/Challenges/Ranching/_pied-piper/rat.sw
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def moveWithMorbidity =
end;

def goFoodDir = \f. \r.
log "in goFoodDir";
let d = fst r in
if (d == down) {
foodHere <- ishere "oats";
Expand All @@ -39,7 +38,6 @@ def goFoodDir = \f. \r.
end;

def goHomeDir = \f. \r.
log "in goHomeDir";
let d = fst r in
if (d == down) {
return ()
Expand All @@ -57,7 +55,6 @@ def goHomeDir = \f. \r.
end;

def findGoodDirection =
log "in findGoodDirection";
isBlocked <- blocked;
if isBlocked {
turn left;
Expand All @@ -83,21 +80,17 @@ def pauseAtRandom =
end;

def returnHome = \homeLoc.
log "in returnHome";
nextDir <- path (inL ()) (inL homeLoc);
case nextDir return $ goHomeDir $ returnHome homeLoc;
end;

def pursueFood = \hadSensedFood. \homeLoc.
log $ "in pursueFood. hadSensedFood? " ++ format hadSensedFood;
nextDir <- path (inR 5) (inR "oats");
case nextDir (\_. if hadSensedFood {returnHome homeLoc} {return ()}) $
goFoodDir $ pursueFood true homeLoc;
end;

def doMovement = \startLoc.
log "in doMovement";

findGoodDirection;
moveUntilBlocked;
pauseAtRandom;
Expand Down

0 comments on commit c8e6dd3

Please sign in to comment.