(FILECREATED " 2-Jan-85 15:02:29" {INDIGO}<LOOPS>TRUCKIN>MULTI>TRUCKINDB.;9 47274 changes to: (METHODS Apple.Display Apple.SetPrice) (FNS Apple.Display Apple.SetPrice) previous date: " 2-NOV-83 11:46:32" {INDIGO}<LOOPS>TRUCKIN>MULTI>TRUCKINDB.;8) (* Copyright (c) 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT TRUCKINDBCOMS) (RPAQQ TRUCKINDBCOMS ((* Copyright (c) 1983 by Xerox Corporation.) (* Database of RoadStops, Commodities, and Hazards for TRUCKIN. TRUCKIN is a mini-expert system for teaching knowledge representation techniques in the Loops programming system. Truckin provides a simple simulation environment for novice Loops users in which small bodies of knowledge can be created and tested interactively. Knowledge in Truckin is in the form of rules for controlling a game piece to "maximize profit.") (* Written in January 1983 by the Loops Group -- Daniel Bobrow, Sanjay Mittal, and Mark Stefik.) (VARS BoardPattern GenericClasses GenericCommodities Commodities MustStops GasStations Producers Consumers OtherStops) (* * Generic Commodities.) (CLASSES * GenericCommodities) (* * Commodities.) (CLASSES * Commodities) (* * Generic Classes.) (CLASSES * GenericClasses) (* * Gas Stations.) (CLASSES * GasStations) (* * Producers.) (CLASSES * Producers) (* * Consumers.) (CLASSES * Consumers) (* * Special RoadStops.) (CLASSES * OtherStops) (METHODS AlicesRestaurant.Visit Apple.Display Apple.SetPrice CityDump.CanBuy Gasoline.CanTransfer Gasoline.TransferOwner RoughRoad.GoingPast UnionHall.Visit WeighStation.GoingPast WeighStation.Visit) (FNS DefaultMustStops FillerRoadStops SetRoadStops) (P (SetRoadStops)))) (* Copyright (c) 1983 by Xerox Corporation.) (* Database of RoadStops, Commodities, and Hazards for TRUCKIN. TRUCKIN is a mini-expert system for teaching knowledge representation techniques in the Loops programming system. Truckin provides a simple simulation environment for novice Loops users in which small bodies of knowledge can be created and tested interactively. Knowledge in Truckin is in the form of rules for controlling a game piece to "maximize profit.") (* Written in January 1983 by the Loops Group -- Daniel Bobrow, Sanjay Mittal, and Mark Stefik. ) (RPAQQ BoardPattern (AlicesRestaurant AlicesRestaurant)) (RPAQQ GenericClasses (GasStation Hazard RoughRoad WeighStation)) (RPAQQ GenericCommodities (Appliances Clothing Fruit Groceries Hardware LuxuryGoods OfficeSupplies SportingGoods Vegetable)) (RPAQQ Commodities (Apple ArtSupplies BaseBall Bicycle Book Carrot Diamond Dishes Egg Gasoline Gold Grape Hammer Pants Refrigerator Saw Shirt StereoSystem Strawberry Television Tomato Xerox1100)) (RPAQQ MustStops (BillsTools DebbyDiamonds DirtyDans DonnaFashions JordyTV KeithGas KimsStuff MarysHens MittalMetal MityMarks MorganBikes PaigesBooks PreetPalace ReidBits SmitaFarms ToniBoutique XSIS)) (RPAQQ GasStations (BrandX CheapGas DirtyDans KeithGas MityMarks SheikGas)) (RPAQQ Producers (ArtsArt BookStop BunnyCarrot Clucks DebbyDiamonds EatOn EggHead FortyNiners Grapefully H&J HotPants IceBox JordyTV MacsApples MarysHens MattStereo MinaVox MorganBikes Mosquitomato OldStereo PetesPatch PrintInc RitaBook SeePast Shirtless SmashM SmitaFarms Sparklers TomsToms TwoEars TwoWheeler VeryBerry VinsVines XSIS Yankees)) (RPAQQ Consumers (AFitch BillsTools CityDump DonnaFashions ExpertSystems FineFoods FredsFruits FreshStuff HomeGoods HomeImp JamNJelly KimsStuff MakeADeal MittalMetal MunicipalDump OshPerson PaigesBooks PaperPlace PlugItIn PreetPalace ReidBits SJFleaMkt SauceFactory SeeItNow StereoHaven StopAndBuy ToniBoutique VegiMart) ) (RPAQQ OtherStops (CurvyRoad BrokenPipe PotHole IcyRoad DirtRoad LaneClosed MenAtWork BigBumps WS4 WS3 WS2 WS1 AlicesRestaurant UnionHall)) (* * Generic Commodities.) (RPAQQ GenericCommodities (Appliances Clothing Fruit Groceries Hardware LuxuryGoods OfficeSupplies SportingGoods Vegetable)) (DEFCLASSES Appliances Clothing Fruit Groceries Hardware LuxuryGoods OfficeSupplies SportingGoods Vegetable) [DEFCLASS Appliances (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:02")) (Supers Commodity) (ClassVariables (WtPerQty 50) (CopyCV (WtPerQty VolPerQty AvgPrice Icon)) (Icon ?) (AvgPrice ?) (VolPerQty ?))] [DEFCLASS Clothing (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:02")) (Supers Commodity) (ClassVariables (WtPerQty 50) (CopyCV (WtPerQty VolPerQty AvgPrice Icon)) (Icon ?) (AvgPrice ?) (VolPerQty ?))] [DEFCLASS Fruit (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:04")) (Supers PerishableCommodity Groceries) (ClassVariables (WtPerQty 50) (MinLifetime ?) (CopyCV (WtPerQty MinLifetime VolPerQty AvgPrice Icon MaxLifetime)) (Icon ?) (AvgPrice ?) (VolPerQty ?) (MaxLifetime ?))] [DEFCLASS Groceries (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:05")) (Supers Commodity) (ClassVariables (WtPerQty 50) (CopyCV (WtPerQty VolPerQty AvgPrice Icon)) (Icon ?) (AvgPrice ?) (VolPerQty ?))] [DEFCLASS Hardware (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:05")) (Supers Commodity) (ClassVariables (WtPerQty 50) (CopyCV (WtPerQty VolPerQty AvgPrice Icon)) (Icon ?) (AvgPrice ?) (VolPerQty ?))] [DEFCLASS LuxuryGoods (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:05")) (Supers Commodity) (ClassVariables (WtPerQty 50) (CopyCV (WtPerQty VolPerQty AvgPrice Icon)) (Icon ?) (AvgPrice ?) (VolPerQty ?))] [DEFCLASS OfficeSupplies (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:06")) (Supers Commodity) (ClassVariables (WtPerQty 50) (CopyCV (WtPerQty VolPerQty AvgPrice Icon)) (Icon ?) (AvgPrice ?) (VolPerQty ?))] [DEFCLASS SportingGoods (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:06")) (Supers Commodity) (ClassVariables (WtPerQty 50) (CopyCV (WtPerQty VolPerQty AvgPrice Icon)) (Icon ?) (AvgPrice ?) (VolPerQty ?))] [DEFCLASS Vegetable (MetaClass CommodityClassMeta Edited: (* mjs: "23-JAN-83 10:08")) (Supers PerishableCommodity Groceries) (ClassVariables (WtPerQty 50) (MinLifetime ?) (CopyCV (WtPerQty MinLifetime VolPerQty AvgPrice Icon MaxLifetime)) (Icon ?) (AvgPrice ?) (VolPerQty ?) (MaxLifetime ?))] (* * Commodities.) (RPAQQ Commodities (Apple ArtSupplies BaseBall Bicycle Book Carrot Diamond Dishes Egg Gasoline Gold Grape Hammer Pants Refrigerator Saw Shirt StereoSystem Strawberry Television Tomato Xerox1100)) (DEFCLASSES Apple ArtSupplies BaseBall Bicycle Book Carrot Diamond Dishes Egg Gasoline Gold Grape Hammer Pants Refrigerator Saw Shirt StereoSystem Strawberry Television Tomato Xerox1100) [DEFCLASS Apple (MetaClass CommodityMeta doc (* Apple -- a tasty autumn fruit and a Commodity in the Truckin simulation. The class Apple has some extra IVs and Methods for the Loops demo.) Edited: (* dgb: "23-SEP-83 09:34")) (Supers Fruit) (ClassVariables (WtPerQty 50) (MinLifetime 7) (Icon appleIcon) (AvgPrice 150) (VolPerQty 50) (MaxLifetime 20)) (InstanceVariables (price 40 doc (* actual buying price)))] [DEFCLASS ArtSupplies (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:00")) (Supers OfficeSupplies) (ClassVariables (Icon ArtIcon) (AvgPrice 500) (VolPerQty 200) (WtPerQty 150))] [DEFCLASS BaseBall (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:01")) (Supers SportingGoods) (ClassVariables (Icon BaseBallIcon) (AvgPrice 900) (VolPerQty 100) (WtPerQty 250))] [DEFCLASS Bicycle (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:02")) (Supers SportingGoods) (ClassVariables (Icon BicycleIcon) (AvgPrice 1200) (VolPerQty 200) (WtPerQty 350))] [DEFCLASS Book (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:03")) (Supers OfficeSupplies) (ClassVariables (Icon BookIcon) (AvgPrice 300) (VolPerQty 75) (WtPerQty 250))] [DEFCLASS Carrot (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:03")) (Supers Vegetable) (ClassVariables (WtPerQty 40) (MinLifetime 6) (Icon carrotIcon) (AvgPrice 200) (VolPerQty 50) (MaxLifetime 20))] [DEFCLASS Diamond (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:04")) (Supers LuxuryGoods) (ClassVariables (WtPerQty 50) (Icon diamondIcon) (AvgPrice 4000) (VolPerQty 50))] [DEFCLASS Dishes (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:05")) (Supers FragileCommodity Hardware) (ClassVariables (Icon DishesIcon) (AvgPrice 400) (VolPerQty 50) (WtPerQty 75) (FragilityLevel 18))] [DEFCLASS Egg (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:06")) (Supers FragileCommodity Groceries) (ClassVariables (WtPerQty 50) (Icon EggIcon) (AvgPrice 150) (VolPerQty 50) (FragilityLevel 14))] [DEFCLASS Gasoline (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:07")) (Supers Commodity) (ClassVariables (Icon gasIcon) (AvgPrice 10) (VolPerQty 1) (WtPerQty 1))] [DEFCLASS Gold (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:08")) (Supers LuxuryGoods) (ClassVariables (WtPerQty 400) (Icon goldIcon) (AvgPrice 3200) (VolPerQty 200))] [DEFCLASS Grape (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:09")) (Supers Fruit) (ClassVariables (WtPerQty 50) (MinLifetime 3) (Icon GrapesIcon) (AvgPrice 350) (VolPerQty 75) (MaxLifetime 6))] [DEFCLASS Hammer (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:10")) (Supers Hardware) (ClassVariables (WtPerQty 300) (Icon HammerIcon) (AvgPrice 800) (VolPerQty 50))] [DEFCLASS Pants (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:11")) (Supers Clothing) (ClassVariables (Icon PantsIcon) (AvgPrice 1200) (VolPerQty 180) (WtPerQty 40))] [DEFCLASS Refrigerator (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:12")) (Supers Appliances) (ClassVariables (WtPerQty 500) (Icon RefrigeratorIcon) (AvgPrice 1500) (VolPerQty 400))] [DEFCLASS Saw (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:12")) (Supers Hardware) (ClassVariables (Icon SawIcon) (AvgPrice 400) (VolPerQty 50) (WtPerQty 50))] [DEFCLASS Shirt (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:13")) (Supers Clothing) (ClassVariables (Icon shirtIcon) (AvgPrice 800) (VolPerQty 100) (WtPerQty 30))] [DEFCLASS StereoSystem (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:14")) (Supers FragileCommodity Appliances LuxuryGoods) (ClassVariables (WtPerQty 200) (Icon StereoSystemIcon) (AvgPrice 1200) (VolPerQty 100) (FragilityLevel 8))] [DEFCLASS Strawberry (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:16")) (Supers FragileCommodity Fruit) (ClassVariables (WtPerQty 40) (MinLifetime 3) (MaxLifetime 6) (Icon StrawberryIcon) (AvgPrice 300) (VolPerQty 60) (FragilityLevel 16))] [DEFCLASS Television (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:17")) (Supers FragileCommodity Appliances) (ClassVariables (WtPerQty 200) (Icon televisionIcon) (AvgPrice 1000) (VolPerQty 150) (FragilityLevel 10))] [DEFCLASS Tomato (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:28")) (Supers FragileCommodity Vegetable) (ClassVariables (WtPerQty 50) (MinLifetime 4) (MaxLifetime 10) (Icon tomatoIcon) (AvgPrice 200) (VolPerQty 50) (FragilityLevel 16))] [DEFCLASS Xerox1100 (MetaClass CommodityMeta Edited: (* sm: "14-FEB-83 11:34")) (Supers OfficeSupplies) (ClassVariables (WtPerQty 400) (VolPerQty 200) (AvgPrice 2000) (Icon xerox1100Icon))] (* * Generic Classes.) (RPAQQ GenericClasses (GasStation Hazard RoughRoad WeighStation)) (DEFCLASSES GasStation Hazard RoughRoad WeighStation) [DEFCLASS GasStation (MetaClass GameAbstractClass Edited: (* mjs: "20-FEB-83 12:53")) (Supers Producer) (ClassVariables (Icon gasIcon) (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "Gas Station") (Commodity #$Gasoline) (Qty 700) (Pr .9))] [DEFCLASS Hazard (MetaClass GameClass Edited: (* sm: "10-FEB-83 14:58")) (Supers GameObject) (ClassVariables (Icon hazardIcon) (InstancePrefix HAZ) (UnnamedInstanceCount 0) (CopyCV (Icon)) (Shade HazardShade))] [DEFCLASS RoughRoad (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:26")) (Supers Hazard OtherRoadStop) (ClassVariables (CopyCV (Icon RoadSign)) (Icon RoughRoadIcon) (RoadSign "BUMPS")) (InstanceVariables (roughness 5 doc (* on a scale of 1 to 10)))] [DEFCLASS WeighStation (MetaClass GameClass Edited: (* sm: "10-FEB-83 15:00")) (Supers Hazard OtherRoadStop) (ClassVariables (Icon WeighStationIcon) (RoadSign "Weigh In!") (Shade WeighStationShade)) (InstanceVariables (weightTax 1 doc (* dollars per unit weight that one pays at the weigh station)) (penaltyFactor 5 doc (* factor on weightTax you pay if you go past the station)))] (* * Gas Stations.) (RPAQQ GasStations (BrandX CheapGas DirtyDans KeithGas MityMarks SheikGas)) (DEFCLASSES BrandX CheapGas DirtyDans KeithGas MityMarks SheikGas) [DEFCLASS BrandX (MetaClass GameClass Edited: (* sm: "20-FEB-83 18:03")) (Supers GasStation) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (Commodity #$Gasoline) (Qty 700) (Pr 1.1) (RoadSign "BrandX"))] [DEFCLASS CheapGas (MetaClass GameClass Edited: (* sm: "20-FEB-83 18:03")) (Supers GasStation) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (Commodity #$Gasoline) (Qty 700) (Pr .9) (RoadSign "CheapGas"))] [DEFCLASS DirtyDans (MetaClass GameClass Edited: (* sm: "20-FEB-83 18:03")) (Supers GasStation) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (Commodity #$Gasoline) (Qty 700) (Pr 1) (RoadSign "DirtyDans"))] [DEFCLASS KeithGas (MetaClass GameClass Edited: (* sm: "20-FEB-83 18:03")) (Supers GasStation) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (Commodity #$Gasoline) (Qty 750) (Pr 1.2) (RoadSign "Keith's Gas"))] [DEFCLASS MityMarks (MetaClass GameClass Edited: (* sm: "20-FEB-83 18:03")) (Supers GasStation) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (Commodity #$Gasoline) (Qty 700) (Pr .9) (RoadSign "MityMarks"))] [DEFCLASS SheikGas (MetaClass GameClass Edited: (* sm: "20-FEB-83 18:04")) (Supers GasStation) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (Commodity #$Gasoline) (Qty 700) (Pr 1.5) (RoadSign "Sheik Gas"))] (* * Producers.) (RPAQQ Producers (ArtsArt BookStop BunnyCarrot Clucks DebbyDiamonds EatOn EggHead FortyNiners Grapefully H&J HotPants IceBox JordyTV MacsApples MarysHens MattStereo MinaVox MorganBikes Mosquitomato OldStereo PetesPatch PrintInc RitaBook SeePast Shirtless SmashM SmitaFarms Sparklers TomsToms TwoEars TwoWheeler VeryBerry VinsVines XSIS Yankees)) (DEFCLASSES ArtsArt BookStop BunnyCarrot Clucks DebbyDiamonds EatOn EggHead FortyNiners Grapefully H&J HotPants IceBox JordyTV MacsApples MarysHens MattStereo MinaVox MorganBikes Mosquitomato OldStereo PetesPatch PrintInc RitaBook SeePast Shirtless SmashM SmitaFarms Sparklers TomsToms TwoEars TwoWheeler VeryBerry VinsVines XSIS Yankees) [DEFCLASS ArtsArt (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:58")) (Supers Producer) (ClassVariables (RoadSign "Art's Art") (Commodity #$ArtSupplies) (Qty 400) (Pr 1))] [DEFCLASS BookStop (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:58")) (Supers Producer) (ClassVariables (RoadSign BookStop) (Commodity #$Book) (Qty 200) (Pr .85))] [DEFCLASS BunnyCarrot (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:58")) (Supers Producer) (ClassVariables (RoadSign "BunnyCarrot") (Commodity #$Carrot) (Qty 800) (Pr .8))] [DEFCLASS Clucks (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "Cluck's Eggs") (Commodity #$Egg) (Qty 400) (Pr .9))] [DEFCLASS DebbyDiamonds (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "Debby Dmds") (Commodity #$Diamond) (Qty 10) (Pr .9))] [DEFCLASS EatOn (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "EatOn Dishes") (Commodity #$Dishes) (Qty 250) (Pr 1))] [DEFCLASS EggHead (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "EggHead") (Commodity #$Egg) (Qty 500) (Pr 1.2))] [DEFCLASS FortyNiners (MetaClass GameClass doc (* * Old California gold for sale here.) Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "49'er Mines") (Commodity #$Gold) (Pr .9) (Qty 40))] [DEFCLASS Grapefully (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign Grapefully) (Commodity #$Grape) (Qty 330) (Pr .95))] [DEFCLASS H&J (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "H&J Saws") (Commodity #$Saw) (Qty 200) (Pr 1.1))] [DEFCLASS HotPants (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "HotPANTS") (Commodity #$Pants) (Qty 250) (Pr .95))] [DEFCLASS IceBox (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "Ice Boxes") (Commodity #$Refrigerator) (Qty 150) (Pr 1))] [DEFCLASS JordyTV (MetaClass GameClass doc (* * TVs straight off the boat.) Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (RoadSign "Jordy's TV") (Commodity #$Television) (Pr 1) (Qty 100))] [DEFCLASS MacsApples (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:59")) (Supers Producer) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "Macs Apples") (Commodity #$Apple) (Qty 420) (Pr .9))] [DEFCLASS MarysHens (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign "Mary's Hens") (Commodity #$Egg) (Qty 200) (Pr .8))] [DEFCLASS MattStereo (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign MattStereo) (Commodity #$StereoSystem) (Qty 200) (Pr 1.1))] [DEFCLASS MinaVox (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign "MinaVox U C") (Commodity #$Television) (Qty 200) (Pr .9))] [DEFCLASS MorganBikes (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign "MorganBikes") (Commodity #$Bicycle) (Qty 500) (Pr 1.4))] [DEFCLASS Mosquitomato (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign Mosquitomato) (Commodity #$Tomato) (Qty 600) (Pr .9))] [DEFCLASS OldStereo (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign "Old Stereos") (Commodity #$StereoSystem) (Qty 100) (Pr .8))] [DEFCLASS PetesPatch (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "Petes Patch") (Commodity #$Strawberry) (Qty 700) (Pr 1.2))] [DEFCLASS PrintInc (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign PrintInc) (Commodity #$Book) (Qty 500) (Pr 1))] [DEFCLASS RitaBook (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign "Rita Book") (Commodity #$Book) (Qty 200) (Pr .8))] [DEFCLASS SeePast (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign "See (Past)") (Commodity #$Saw) (Qty 350) (Pr .9))] [DEFCLASS Shirtless (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:00")) (Supers Producer) (ClassVariables (RoadSign Shirtless) (Commodity #$Shirt) (Qty 300) (Pr 1))] [DEFCLASS SmashM (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:01")) (Supers Producer) (ClassVariables (RoadSign "Smash Em") (Commodity #$Hammer) (Qty 450) (Pr 1))] [DEFCLASS SmitaFarms (MetaClass GameClass doc (* * Smita's Apple Ranch. A Good place to buy premium apples.) Edited: (* mjs: "20-FEB-83 13:01")) (Supers Producer) (ClassVariables (RoadSign "Smita Farms") (Commodity #$Apple) (Pr 1.3) (Qty 750))] [DEFCLASS Sparklers (MetaClass GameClass doc (* * The basic source for wholesale diamonds. Representative of the Diamond cartel.) Edited: (* mjs: "20-FEB-83 13:01")) (Supers Producer) (ClassVariables (RoadSign "Sparklers") (Commodity #$Diamond) (Pr 1.8) (Qty 30))] [DEFCLASS TomsToms (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:01")) (Supers Producer) (ClassVariables (RoadSign "Tom's Matos") (Commodity #$Tomato) (Qty 650) (Pr 1.5))] [DEFCLASS TwoEars (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:01")) (Supers Producer) (ClassVariables (RoadSign "2Ears Stereo") (Commodity #$StereoSystem) (Qty 360) (Pr 1.9))] [DEFCLASS TwoWheeler (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:01")) (Supers Producer) (ClassVariables (RoadSign TwoWheeler) (Commodity #$Bicycle) (Qty 200) (Pr .9))] [DEFCLASS VeryBerry (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:02")) (Supers Producer) (ClassVariables (RoadSign "VeryBerry") (Commodity #$Strawberry) (Qty 400) (Pr .9))] [DEFCLASS VinsVines (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:02")) (Supers Producer) (ClassVariables (RoadSign "Vin's Vines") (Commodity #$Grape) (Qty 600) (Pr 1))] [DEFCLASS XSIS (MetaClass GameClass Edited: (* sm: " 6-JUN-83 10:14")) (Supers Producer) (ClassVariables (RoadSign "XSIS") (Commodity #$Xerox1100) (Pr 1) (Qty 300))] [DEFCLASS Yankees (MetaClass GameClass Edited: (* mjs: "20-FEB-83 13:02")) (Supers Producer) (ClassVariables (RoadSign Yankees) (Commodity #$BaseBall) (Qty 400) (Pr 1.2))] (* * Consumers.) (RPAQQ Consumers (AFitch BillsTools CityDump DonnaFashions ExpertSystems FineFoods FredsFruits FreshStuff HomeGoods HomeImp JamNJelly KimsStuff MakeADeal MittalMetal MunicipalDump OshPerson PaigesBooks PaperPlace PlugItIn PreetPalace ReidBits SJFleaMkt SauceFactory SeeItNow StereoHaven StopAndBuy ToniBoutique VegiMart) ) (DEFCLASSES AFitch BillsTools CityDump DonnaFashions ExpertSystems FineFoods FredsFruits FreshStuff HomeGoods HomeImp JamNJelly KimsStuff MakeADeal MittalMetal MunicipalDump OshPerson PaigesBooks PaperPlace PlugItIn PreetPalace ReidBits SJFleaMkt SauceFactory SeeItNow StereoHaven StopAndBuy ToniBoutique VegiMart) [DEFCLASS AFitch (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:54")) (Supers Consumer) (ClassVariables (RoadSign "A. Fitch Co") (Commodity #$LuxuryGoods) (Qty 100) (Pr 4.5))] [DEFCLASS BillsTools (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:55")) (Supers Consumer) (ClassVariables (RoadSign "BillsTools") (Commodity #$Hardware) (Qty 700) (Pr 5))] [DEFCLASS CityDump (MetaClass GameClass doc (* * A Place to get rid of spoiled merchandise.) Edited: (* mjs: "20-FEB-83 12:55")) (Supers Consumer) (ClassVariables (Pr -.5) (Commodity #$Commodity) (CopyCV (Pr Qty)) (Qty 750) (RoadSign "City Dump")) (InstanceVariables (pr -.05))] [DEFCLASS DonnaFashions (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:55")) (Supers Consumer) (ClassVariables (RoadSign "DonnaFshns") (Commodity #$Clothing) (Qty 400) (Pr 4.5))] [DEFCLASS ExpertSystems (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:41")) (Supers Consumer) (ClassVariables (CopyCV (RoadSign Pr Qty)) (RoadSign "Expert Sys") (Commodity #$Xerox1100) (Qty 100) (Pr 6.5))] [DEFCLASS FineFoods (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:41")) (Supers Consumer) (ClassVariables (RoadSign "Fine Foods") (Commodity #$Groceries) (Qty 700) (Pr 7))] [DEFCLASS FredsFruits (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:41")) (Supers Consumer) (ClassVariables (RoadSign "Fred's Fruits") (Commodity #$Fruit) (Qty 500) (Pr 9))] [DEFCLASS FreshStuff (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:41")) (Supers Consumer) (ClassVariables (RoadSign "FreshStuff") (Commodity #$Fruit) (Qty 700) (Pr 9.5))] [DEFCLASS HomeGoods (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:55")) (Supers Consumer) (ClassVariables (RoadSign "Home Goods") (Commodity #$Appliances) (Qty 450) (Pr 4))] [DEFCLASS HomeImp (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:55")) (Supers Consumer) (ClassVariables (RoadSign "HomeImp") (Commodity #$Hardware) (Qty 400) (Pr 6))] [DEFCLASS JamNJelly (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:42")) (Supers Consumer) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "Jam-N-Jelly") (Commodity #$Strawberry) (Qty 200) (Pr 11))] [DEFCLASS KimsStuff (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:56")) (Supers Consumer) (ClassVariables (RoadSign "Kims Stuff") (Commodity #$Commodity) (Qty 700) (Pr 3))] [DEFCLASS MakeADeal (MetaClass GameClass doc (* * The Marin Flea Market. A great place to sell anything, but at a cut rate. Caveat Emptor.) Edited: (* mjs: "20-FEB-83 12:56")) (Supers Consumer) (ClassVariables (Pr 1.6) (Qty 700) (Commodity #$Commodity) (RoadSign "MakeADeal"))] [DEFCLASS MittalMetal (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:56")) (Supers Consumer) (ClassVariables (RoadSign "MittalMetal") (Commodity #$Gold) (Qty 15) (Pr 9))] [DEFCLASS MunicipalDump (MetaClass GameClass Edited: (* sm: "14-FEB-83 13:23")) (Supers CityDump) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "Muni Dump") (Commodity #$Commodity) (Qty 700) (Pr -.1)) (InstanceVariables (pr -.1))] [DEFCLASS OshPerson (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:56")) (Supers Consumer) (ClassVariables (RoadSign "OshPerson") (Commodity #$SportingGoods) (Qty 500) (Pr 5))] [DEFCLASS PaigesBooks (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:56")) (Supers Consumer) (ClassVariables (RoadSign "PaigesBooks") (Commodity #$Book) (Qty 100) (Pr 6.5))] [DEFCLASS PaperPlace (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:56")) (Supers Consumer) (ClassVariables (RoadSign "Paper Place") (Commodity #$OfficeSupplies) (Qty 700) (Pr 3))] [DEFCLASS PlugItIn (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:56")) (Supers Consumer) (ClassVariables (RoadSign "PlugItIn") (Commodity #$Appliances) (Qty 200) (Pr 5.5))] [DEFCLASS PreetPalace (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:57")) (Supers Consumer) (ClassVariables (RoadSign "PreetPalace") (Commodity #$LuxuryGoods) (Qty 40) (Pr 7))] [DEFCLASS ReidBits (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:42")) (Supers Consumer) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "Reid's Bits") (Commodity #$Xerox1100) (Qty 50) (Pr 10))] [DEFCLASS SJFleaMkt (MetaClass GameClass doc (* * The San Jose Flea Market. A great place to sell anything, but at a cut rate. Caveate Emptor.) Edited: (* mjs: "20-FEB-83 12:57")) (Supers Consumer) (ClassVariables (Pr 1.2) (Qty 700) (Commodity #$Commodity) (RoadSign "Flea Mkt"))] [DEFCLASS SauceFactory (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:43")) (Supers Consumer) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "SauceFactory") (Commodity #$Tomato) (Qty 200) (Pr 9))] [DEFCLASS SeeItNow (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:57")) (Supers Consumer) (ClassVariables (RoadSign "SeeItNow") (Commodity #$Television) (Qty 100) (Pr 7))] [DEFCLASS StereoHaven (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:57")) (Supers Consumer) (ClassVariables (RoadSign "Stereo Haven") (Commodity #$StereoSystem) (Qty 90) (Pr 6.5))] [DEFCLASS StopAndBuy (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:43")) (Supers Consumer) (ClassVariables (CopyCV (RoadSign Pr Qty)) (RoadSign "Stop-N-Buy") (Commodity #$Groceries) (Qty 600) (Pr 6))] [DEFCLASS ToniBoutique (MetaClass GameClass Edited: (* mjs: "20-FEB-83 12:57")) (Supers Consumer) (ClassVariables (CopyCV (RoadSign Pr Qty Commodity)) (RoadSign "Toni's Boutique") (Commodity #$Clothing) (Qty 200) (Pr 6))] [DEFCLASS VegiMart (MetaClass GameClass Edited: (* sm: "21-FEB-83 12:43")) (Supers Consumer) (ClassVariables (RoadSign "Vegi Mart") (Commodity #$Vegetable) (Qty 400) (Pr 8))] (* * Special RoadStops.) (RPAQQ OtherStops (CurvyRoad BrokenPipe PotHole IcyRoad DirtRoad LaneClosed MenAtWork BigBumps WS4 WS3 WS2 WS1 AlicesRestaurant UnionHall)) (DEFCLASSES CurvyRoad BrokenPipe PotHole IcyRoad DirtRoad LaneClosed MenAtWork BigBumps WS4 WS3 WS2 WS1 AlicesRestaurant UnionHall) [DEFCLASS CurvyRoad (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:24")) (Supers RoughRoad) (ClassVariables (RoadSign "Curves!")) (InstanceVariables (roughness 6))] [DEFCLASS BrokenPipe (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:24")) (Supers RoughRoad) (ClassVariables (RoadSign "Broken Pipe")) (InstanceVariables (roughness 7))] [DEFCLASS PotHole (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:24")) (Supers RoughRoad) (ClassVariables (RoadSign "Pot Hole")) (InstanceVariables (roughness 7))] [DEFCLASS IcyRoad (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:24")) (Supers RoughRoad) (ClassVariables (RoadSign "Icy Road")) (InstanceVariables (roughness 4))] [DEFCLASS DirtRoad (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:25")) (Supers RoughRoad) (ClassVariables (RoadSign "DirtRoad")) (InstanceVariables (roughness 5))] [DEFCLASS LaneClosed (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:25")) (Supers RoughRoad) (ClassVariables (RoadSign "Lane Closed")) (InstanceVariables (roughness 3))] [DEFCLASS MenAtWork (MetaClass GameClass Edited: (* mjs: "30-JAN-83 14:33")) (Supers RoughRoad) (ClassVariables (RoadSign "Men At Work")) (InstanceVariables (roughness 5))] [DEFCLASS BigBumps (MetaClass GameClass Edited: (* sm: "28-JAN-83 21:25")) (Supers RoughRoad) (ClassVariables (RoadSign "BUMP!!")) (InstanceVariables (roughness 8))] [DEFCLASS WS4 (MetaClass Class Edited: (* sm: "28-JAN-83 16:18")) (Supers WeighStation) (ClassVariables (RoadSign "Fish Scales")) (InstanceVariables (penaltyFactor 3))] [DEFCLASS WS3 (MetaClass Class Edited: (* mjs: "25-JAN-83 13:37")) (Supers WeighStation) (ClassVariables (RoadSign "Smokey Scales"))] [DEFCLASS WS2 (MetaClass Class Edited: (* sm: "28-JAN-83 16:16")) (Supers WeighStation) (ClassVariables (RoadSign "Weigh Here")) (InstanceVariables (penaltyFactor 6))] [DEFCLASS WS1 (MetaClass Class Edited: (* sm: "28-JAN-83 16:16")) (Supers WeighStation) (ClassVariables (RoadSign "Scales Ahead")) (InstanceVariables (penaltyFactor 4))] [DEFCLASS AlicesRestaurant (MetaClass GameClass Edited: (* sm: "10-FEB-83 14:56")) (Supers OtherRoadStop) (ClassVariables (RoadSign "Alice's") (Icon AlicesRestaurantIcon) (Shade AlicesShade))] [DEFCLASS UnionHall (MetaClass GameClass Edited: (* sm: "10-FEB-83 14:30")) (Supers OtherRoadStop) (ClassVariables (RoadSign "Union Hall") (Icon UnionHallIcon) (Shade UnionHallShade))] [METH AlicesRestaurant Visit (player reason time) (* New method template)] [METH Apple Display NIL NIL] [METH Apple SetPrice (newPrice) NIL] [METH CityDump CanBuy NIL NIL] [METH Gasoline CanTransfer NIL (* CanTransfer specialized for Gasoline)] [METH Gasoline TransferOwner (newOwner priceRatio qty) (* transfers gasoline from one owner to another)] [METH RoughRoad GoingPast NIL NIL] [METH UnionHall Visit (player reason time) (* Visit UnionHall)] [METH WeighStation GoingPast NIL (* Message sent when a player wats to go past WeighStation.)] [METH WeighStation Visit (player reason time) (* Does the checking for Weigh Station fines if visting)] (DEFINEQ (AlicesRestaurant.Visit [LAMBDA (self player reason time) (* sm: "13-JUL-83 09:24") (* New method template) (←Super self Visit player reason time]) (Apple.Display (Method ((Apple Display) self) (* smL " 2-Jan-85 12:39") (* Display a big apple with its name superimposed) (LET [(name (GetObjectName self)) (W (CREATEWFROMIMAGE (BITMAPCOPY BigAppleIcon] (GETMOUSESTATE) (MOVEW W (CONS LASTMOUSEX LASTMOUSEY)) (MOVEW W) (if name then (CENTERPRINTINREGION name NIL W)) W))) (Apple.SetPrice (Method ((Apple SetPrice) self newPrice) (* smL " 2-Jan-85 14:18") (* Complain on increases; cheer when price goes down) (PROG ((oldPrice (@ price))) (←@ price newPrice) (COND ((GREATERP newPrice oldPrice) (printout TTY newPrice " is more than " oldPrice "." " Terrible inflation!!!" T)) ((GREATERP oldPrice newPrice) (printout TTY newPrice " is less than " oldPrice "." " What a pleasant surprise." T))) (RETURN newPrice)))) (CityDump.CanBuy [LAMBDA (self commodity pr qty seller) (* sm: "25-JAN-83 18:14") (* checks if CityDump will buy this commodity) (* Returns self if can, else NIL) (PROG NIL (* check if want to buy this commodity) (COND ((← commodity InstOf!(@@ Commodity))) (T (BrokenRules seller "wrongcommodity") (RETURN NIL))) (* check qty) (COND ((GREATERP qty (@ qty)) (BrokenRules seller "too much quantity") (RETURN NIL))) (* check pr) (COND ((GREATERP pr (@ pr)) (BrokenRules seller "price too high") (RETURN NIL))) (RETURN self]) (Gasoline.CanTransfer [LAMBDA (self newOwner pr qty prevOwner) (* sm: " 6-JUN-83 18:05") (* CanTransfer specialized for Gasoline) (← newOwner CanBuyFuel self (COND ((NULL pr) (%@ pr)) (T pr)) (COND ((NULL qty) (%@ qty)) (T qty)) prevOwner]) (Gasoline.TransferOwner [LAMBDA (self newOwner priceRatio qty) (* sm: "13-JUN-83 08:18") (* transfers gasoline from one owner to another) (* If qty is not specified, all is transferred, else only qty is transferred by creating a new instance) (* If priceRatio is not specified, then uses one currently in self) (PROG (transfer (prevOwner (@ owner)) (tpr priceRatio) (tqty qty)) [COND ((NULL tpr) (SETQ tpr (@ pr] [COND ((NULL tqty) (SETQ tqty (@ qty] (* ask the newOwner if he can buy) (* ask the previous owner to sell the specified qty) (← prevOwner Sell self tpr tqty) (COND ((OR (NULL qty) (EQUAL qty (@ qty))) (* transfer completely) (SETQ transfer self)) (T (* create a new instance to only transfer specified qty) (SETQ transfer (← (Class self) New (COND ((NULL priceRatio) (@ pr)) (T priceRatio)) qty (QUOTE *SPECIAL*))) (PutValue self (QUOTE qty) (DIFFERENCE (@ qty) qty)) (* PartialTransfer message copies those aspects of self which have to be copied over but may depend on the actual classification of self) (DoFringeMethods transfer (QUOTE PartialTransfer) self))) (* write the new owner's name) (PutValue transfer (QUOTE owner) newOwner) (* ask new owner to update accounts and stock for BUY) (← newOwner BuyFuel transfer prevOwner) (RETURN transfer]) (RoughRoad.GoingPast [LAMBDA (self player dist) (* dgb: " 9-JUN-83 19:02") (* Message sent when a player wats to go past this roadstop.) (* Returns: Reason if this RoadStop intercepts player. NIL otherwise) (* If not stopping here, checks if any cargo will break) (COND ((←Super self GoingPast player dist)) (T (* not stopping here. check cargo) (for x in (@(@ player truck) cargo) do (DoFringeMethods x (QUOTE CheckFragility) self dist)) NIL]) (UnionHall.Visit [LAMBDA (self player reason time) (* sm: "13-JUL-83 09:25") (* Visit UnionHall) (←Super self Visit player reason time) (← (@ player truck) VisitUnionHall) player]) (WeighStation.GoingPast [LAMBDA (self player dist) (* sm: " 7-JUN-83 12:04") (* Message sent when a player wats to go past WeighStation.) (* Returns: Reason if intercepts player directly or inherited. NIL otherwise) (COND ((←Super self GoingPast player dist)) ((AND (← self RoomToPark?) (WSRuleViolated? player self dist)) (QUOTE WeighStation)) (T NIL]) (WeighStation.Visit [LAMBDA (self player reason time) (* sm: "13-JUL-83 09:25") (* Does the checking for Weigh Station fines if visting) (PROG (fine (penalty 0) (truck (@ player truck))) (←Super self Visit player reason time) [COND ((NOT (← player InstOf!(QUOTE Bandit))) (* visitor is regular player) [COND ((EQ reason (QUOTE WeighStation)) [SETQ penalty (TIMES (@ penaltyFactor) (PLUS 10 (@ truck weight] (BrokenRules player "Speeding past a WeighStation" NIL NIL (CONCAT "Forcibly stopped!! at " (@@ RoadSign] [SETQ fine (FIX (PLUS penalty (TIMES (@ weightTax) (PLUS 10 (@ truck weight] (COND ((NOT (LESSP (@ truck cashBox) fine)) (WriteGameStatus (GetObjectName player) " paid total Wt. Tax $" fine) (ChangeValue truck (QUOTE cashBox) (IDIFFERENCE (@ truck cashBox) fine))) (T (BrokenRules player (CONCAT "Cannot pay Wt. Tax of $" fine) NIL 1] (RETURN player]) ) (DEFINEQ (DefaultMustStops [LAMBDA NIL (* sm: "15-FEB-83 10:36") (CONS (QUOTE UnionHall) (APPEND BoardPattern MustStops]) (FillerRoadStops [LAMBDA (Must) (* sm: "15-FEB-83 10:14") (PROG [(AllStops (SORT (APPEND Producers Consumers GasStations (APPEND OtherStops] (for x in Must do (DREMOVE x AllStops)) (RETURN AllStops]) (SetRoadStops [LAMBDA NIL (* sm: "14-FEB-83 13:53") (SETQ RoadStops (SORT (APPEND Producers Consumers GasStations (APPEND OtherStops]) ) (SetRoadStops) (PUTPROPS TRUCKINDB COPYRIGHT ("Xerox Corporation" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (38878 46502 (AlicesRestaurant.Visit 38888 . 39145) (Apple.Display 39147 . 39667) ( Apple.SetPrice 39669 . 40316) (CityDump.CanBuy 40318 . 41221) (Gasoline.CanTransfer 41223 . 41590) ( Gasoline.TransferOwner 41592 . 43626) (RoughRoad.GoingPast 43628 . 44449) (UnionHall.Visit 44451 . 44756) (WeighStation.GoingPast 44758 . 45348) (WeighStation.Visit 45350 . 46500)) (46503 47179 ( DefaultMustStops 46513 . 46689) (FillerRoadStops 46691 . 46980) (SetRoadStops 46982 . 47177))))) STOP