(FILECREATED "16-NOV-83 18:44:47" {INDIGO}<LOOPS>DEMO>BIGMAC.;1 7403 changes to: (METHODS BigMac.GoToStoppingPlace BigMac.TakeTurn BigMac.SelectTruck) (INSTANCES BigMac.GoToStoppingPlace BigMac.TakeTurn BigMac.SelectTruck GoToStoppingPlaceBigMacRules TakeTurnBigMacRules) (VARS BIGMACCOMS) (FNS BigMac.SelectTruck GoToStoppingPlaceBigMacRules TakeTurnBigMacRules)) (PRETTYCOMPRINT BIGMACCOMS) (RPAQQ BIGMACCOMS ((METHODS BigMac.GoToStoppingPlace BigMac.SelectTruck BigMac.TakeTurn) (INSTANCES GoToStoppingPlaceBigMacRules TakeTurnBigMacRules) (FNS GoToStoppingPlaceBigMacRules TakeTurnBigMacRules))) [METH BigMac GoToStoppingPlace NIL (* RuleSet GoToStoppingPlaceTravelerRules is installed as the selector GoToStoppingPlace of the class Traveler) (method GoToStoppingPlaceBigMacRules RuleSet GoToStoppingPlaceBigMacRules)] [METH BigMac SelectTruck NIL (* always returns MacTruck)] [METH BigMac TakeTurn NIL NIL (method TakeTurnBigMacRules RuleSet TakeTurnBigMacRules)] (DEFINEQ (BigMac.SelectTruck [LAMBDA (self) (* dgb: "16-NOV-83 16:56") (* always returns MacTruck) (QUOTE MacTruck]) ) [DEFINST RuleSet (GoToStoppingPlaceBigMacRules "NNS0.lVC1.DT8.1087") (perspectiveNode #&(RuleSetNode "NNS0.lVC1.DT8.1093") myViewName RuleSet) (name #(GoToStoppingPlaceBigMacRules NIL RememberName)) (compiledRules GoToStoppingPlaceBigMacRules) (workSpace BigMac) (args NIL) (tempVars (temp)) (taskVars NIL) (debugVars NIL) (numRules 3) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)] [DEFINST RuleSet (TakeTurnBigMacRules "NNS0.lVC1.DT8.1080") (perspectiveNode #&(RuleSetNode "NNS0.lVC1.DT8.1094") myViewName RuleSet) (name #(TakeTurnBigMacRules NIL RememberName)) (compiledRules TakeTurnBigMacRules) (workSpace BigMac) (args NIL) (tempVars (alices)) (taskVars NIL) (debugVars NIL) (numRules 2) (controlStructure DOALL) (whileCondition NIL) (compilerOptions (A)) (auditClass NIL) (metaAssignments NIL) (ruleClass NIL) (taskClass)] [DEFINST RuleSetNode ("NNS0.lVC1.DT8.1093") (perspectives ? RuleSet #&(RuleSet "NNS0.lVC1.DT8.1087") Source #&(RuleSetSource "NNS0.lVC1.DT8.1095"))] [DEFINST RuleSetNode ("NNS0.lVC1.DT8.1094") (perspectives ? RuleSet #&(RuleSet "NNS0.lVC1.DT8.1080") Source #&(RuleSetSource "NNS0.lVC1.DT8.1096"))] [DEFINST RuleSetSource ("NNS0.lVC1.DT8.1095") (indexedVars ((#&(Rule "NNS0.lVC1.DT8.1097")) (#&(Rule "NNS0.lVC1.DT8.1098")) (#&(Rule "NNS0.lVC1.DT8.1089")))) (perspectiveNode #&(RuleSetNode "NNS0.lVC1.DT8.1093") myViewName Source) (created "27-JAN-83 00:02:00") (creator STEFIK) (edited "16-NOV-83 18:12:56") (editor LOOPSCOURSE.GUEST)] [DEFINST RuleSetSource ("NNS0.lVC1.DT8.1096") (indexedVars ((#&(Rule "NNS0.lVC1.DT8.1086")) (#&(Rule "NNS0.lVC1.DT8.1099")))) (perspectiveNode #&(RuleSetNode "NNS0.lVC1.DT8.1094") myViewName Source) (created "26-JAN-83 23:15:35") (creator STEFIK) (edited "16-NOV-83 18:05:04") (editor LOOPSCOURSE.GUEST)] [DEFINST Rule ("NNS0.lVC1.DT8.1097") (source "(* Ask to go to a stopping place returned by FindStoppingPlace) -> .FindStoppingPlace (← \PlayerInterface Move self stoppingPlace);") (edited "16-NOV-83 18:12:56") (editor LOOPSCOURSE.GUEST) (ruleNumber 1) (ruleSet #&(RuleSet "NNS0.lVC1.DT8.1087"))] [DEFINST Rule ("NNS0.lVC1.DT8.1098") (source " (* Check if real truck location is a gas station. Don't use stoppingPlace, since chosen it may not have been reached because of cops or robbers) IF (ISA truck:location $GasStation) THEN .BuyGas;") (edited "16-NOV-83 18:12:56") (editor LOOPSCOURSE.GUEST) (ruleNumber 2) (ruleSet #&(RuleSet "NNS0.lVC1.DT8.1087"))] [DEFINST Rule ("NNS0.lVC1.DT8.1089") (source "(* Switch destination and nextDestination when you arrive) IF truck:location=destination THEN temp ← destination destination ← nextDestination nextDestination ← temp direction ← (DirectionOf destination);") (edited "16-NOV-83 18:12:56") (editor LOOPSCOURSE.GUEST) (ruleNumber 3) (ruleSet #&(RuleSet "NNS0.lVC1.DT8.1087"))] [DEFINST Rule ("NNS0.lVC1.DT8.1086") (source "(* Top Level RuleSet for BigMac. Travel between the two AlicesRestaurant) (* On first call, initialize destination and nextDestination) IF ~destination THEN alices←(RoadStops 'AlicesRestaurant) destination ← (CAR alices) direction ← (DirectionOf destination) nextDestination ← (CADR alices);") (edited "16-NOV-83 18:05:04") (editor LOOPSCOURSE.GUEST) (ruleNumber 1) (ruleSet #&(RuleSet "NNS0.lVC1.DT8.1080"))] [DEFINST Rule ("NNS0.lVC1.DT8.1099") (source " THEN .GoToStoppingPlace;") (edited "16-NOV-83 18:05:04") (editor LOOPSCOURSE.GUEST) (ruleNumber 2) (ruleSet #&(RuleSet "NNS0.lVC1.DT8.1080"))] (DEFINEQ (GoToStoppingPlaceBigMacRules [LAMBDA (self) (PROG (↑auditRecord ↑value temp) [SETQ ↑value (PROGN (← self FindStoppingPlace) (← PlayerInterface Move self (GetValue self (QUOTE stoppingPlace] [COND ((ISA (GetValue (GetValue self (QUOTE truck)) (QUOTE location)) ($ GasStation)) (SETQ ↑value (← self BuyGas] [COND ((EQ (GetValue (GetValue self (QUOTE truck)) (QUOTE location)) (GetValue self (QUOTE destination))) (SETQ ↑value (PROGN (PROGN (* Make an audit record for this rule and set its audit values.) (SETQ ↑auditRecord (← ($ StandardAuditRecord) NewTemp)) (PutValue ↑auditRecord (QUOTE rule) (GetObjFromUID "NNS0.lVC1.DT8.1089"))) (SETQ temp (GetValue self (QUOTE destination))) (PutAuditRec self (QUOTE destination) (GetValue self (QUOTE nextDestination)) ↑auditRecord) (PutAuditRec self (QUOTE nextDestination) temp ↑auditRecord) (PutAuditRec self (QUOTE direction) (DirectionOf (GetValue self (QUOTE destination))) ↑auditRecord] QUIT(RETURN ↑value]) (TakeTurnBigMacRules [LAMBDA (self) (PROG (↑auditRecord ↑value alices) [COND ((NOT (GetValue self (QUOTE destination))) (SETQ ↑value (PROGN (PROGN (* Make an audit record for this rule and set its audit values.) (SETQ ↑auditRecord (← ($ StandardAuditRecord) NewTemp)) (PutValue ↑auditRecord (QUOTE rule) (GetObjFromUID "NNS0.lVC1.DT8.1086"))) (SETQ alices (RoadStops (QUOTE AlicesRestaurant))) (PutAuditRec self (QUOTE destination) (CAR alices) ↑auditRecord) (PutAuditRec self (QUOTE direction) (DirectionOf (GetValue self (QUOTE destination))) ↑auditRecord) (PutAuditRec self (QUOTE nextDestination) (CADR alices) ↑auditRecord] (SETQ ↑value (← self GoToStoppingPlace)) QUIT(RETURN ↑value]) ) (DECLARE: DONTCOPY (FILEMAP (NIL (1074 1316 (BigMac.SelectTruck 1084 . 1314)) (5242 7381 (GoToStoppingPlaceBigMacRules 5252 . 6467) (TakeTurnBigMacRules 6469 . 7379))))) STOP