From dc6d494ff4b1bbfde54063606c020589f8a31be3 Mon Sep 17 00:00:00 2001 From: ThomasFooteDQ Date: Sun, 2 Feb 2014 16:39:08 -0500 Subject: [PATCH] Initial Version --- chips/4NodeL2R.chip | Bin 0 -> 150 bytes chips/4NodeR2L.chip | Bin 0 -> 150 bytes chips/4ORL2R.chip | Bin 0 -> 366 bytes chips/4ORR2L.chip | Bin 0 -> 367 bytes chips/6BitCounter.chip | Bin 0 -> 2967 bytes chips/Bus.chip | Bin 0 -> 177 bytes chips/Clock.chip | Bin 0 -> 2899 bytes chips/CountToN.chip | Bin 0 -> 2691 bytes chips/Delay.chip | Bin 0 -> 695 bytes chips/FullAdder.chip | Bin 0 -> 684 bytes chips/Monomer.chip | Bin 0 -> 1304 bytes chips/OneShot.chip | Bin 0 -> 795 bytes chips/RSflipflop.chip | Bin 0 -> 715 bytes chips/Token.chip | Bin 0 -> 634 bytes chips/WallHugger.chip | Bin 0 -> 4187 bytes chips/gates.chip | Bin 0 -> 509 bytes chips/old_WallHugger.chip | Bin 0 -> 3347 bytes chips/oscillator.chip | Bin 0 -> 195 bytes chips/quarter.chip | Bin 0 -> 1212 bytes images/0064.jpg | Bin 0 -> 1155 bytes images/0065.jpg | Bin 0 -> 1203 bytes images/0066.jpg | Bin 0 -> 1190 bytes images/0067.jpg | Bin 0 -> 1126 bytes images/0068.jpg | Bin 0 -> 1157 bytes images/0069.jpg | Bin 0 -> 1240 bytes images/0073.jpg | Bin 0 -> 1143 bytes images/0074.jpg | Bin 0 -> 1093 bytes images/0075.jpg | Bin 0 -> 1036 bytes images/0076.jpg | Bin 0 -> 1013 bytes images/0077.jpg | Bin 0 -> 1045 bytes images/0078.jpg | Bin 0 -> 373 bytes images/0079.jpg | Bin 0 -> 386 bytes images/0080.jpg | Bin 0 -> 374 bytes images/0081.jpg | Bin 0 -> 368 bytes images/0082.jpg | Bin 0 -> 940 bytes images/0083.jpg | Bin 0 -> 999 bytes images/0084.jpg | Bin 0 -> 1000 bytes images/0085.jpg | Bin 0 -> 940 bytes images/0086.jpg | Bin 0 -> 812 bytes images/0087.jpg | Bin 0 -> 963 bytes images/DQlogo.gif | Bin 0 -> 10104 bytes images/FFdown.gif | Bin 0 -> 900 bytes images/FFleft.gif | Bin 0 -> 898 bytes images/FFright.gif | Bin 0 -> 899 bytes images/FFup.gif | Bin 0 -> 900 bytes images/blueHorizontal.gif | Bin 0 -> 853 bytes images/blueVertical.gif | Bin 0 -> 856 bytes images/cam0.gif | Bin 0 -> 952 bytes images/cam1.gif | Bin 0 -> 967 bytes images/cam2.gif | Bin 0 -> 949 bytes images/disco0.gif | Bin 0 -> 936 bytes images/disco1.gif | Bin 0 -> 937 bytes images/disco2.gif | Bin 0 -> 936 bytes images/disco3.gif | Bin 0 -> 937 bytes images/disco4.gif | Bin 0 -> 936 bytes images/disco5.gif | Bin 0 -> 937 bytes images/fan0.gif | Bin 0 -> 1135 bytes images/fan1.gif | Bin 0 -> 1161 bytes images/fan2.gif | Bin 0 -> 1185 bytes images/fan3.gif | Bin 0 -> 1195 bytes images/field0.jpg | Bin 0 -> 882 bytes images/field1.jpg | Bin 0 -> 853 bytes images/grab0.jpg | Bin 0 -> 1999 bytes images/grab1.jpg | Bin 0 -> 1966 bytes images/helper0.gif | Bin 0 -> 1212 bytes images/helper1.gif | Bin 0 -> 1212 bytes images/helper2.gif | Bin 0 -> 1207 bytes images/helper3.gif | Bin 0 -> 1215 bytes images/helper4.gif | Bin 0 -> 1215 bytes images/helper5.gif | Bin 0 -> 1212 bytes images/helper6.gif | Bin 0 -> 1212 bytes images/helper7.gif | Bin 0 -> 1205 bytes images/hold.gif | Bin 0 -> 915 bytes images/junk0.jpg | Bin 0 -> 1009 bytes images/junk1.jpg | Bin 0 -> 344 bytes images/junk10.jpg | Bin 0 -> 1125 bytes images/junk11.jpg | Bin 0 -> 424 bytes images/junk12.jpg | Bin 0 -> 1033 bytes images/junk13.jpg | Bin 0 -> 965 bytes images/junk2.jpg | Bin 0 -> 859 bytes images/junk3.jpg | Bin 0 -> 954 bytes images/junk4.jpg | Bin 0 -> 1048 bytes images/junk5.jpg | Bin 0 -> 1039 bytes images/junk6.jpg | Bin 0 -> 899 bytes images/junk7.jpg | Bin 0 -> 953 bytes images/junk8.jpg | Bin 0 -> 1142 bytes images/junk9.jpg | Bin 0 -> 1231 bytes images/monitor.gif | Bin 0 -> 1034 bytes images/skyguard0.gif | Bin 0 -> 922 bytes images/skyguard1.gif | Bin 0 -> 927 bytes images/skyguard2.gif | Bin 0 -> 918 bytes images/skyguard3.gif | Bin 0 -> 922 bytes images/skyguard4.gif | Bin 0 -> 931 bytes images/skyway00.gif | Bin 0 -> 938 bytes images/skyway01.gif | Bin 0 -> 927 bytes images/skyway02.gif | Bin 0 -> 925 bytes images/skyway03.gif | Bin 0 -> 931 bytes images/skyway04.gif | Bin 0 -> 919 bytes images/skyway05.gif | Bin 0 -> 938 bytes images/skyway06.gif | Bin 0 -> 942 bytes images/skyway07.gif | Bin 0 -> 941 bytes images/skyway08.gif | Bin 0 -> 935 bytes images/skyway09.gif | Bin 0 -> 936 bytes images/skyway10.gif | Bin 0 -> 936 bytes images/skyway11.gif | Bin 0 -> 937 bytes images/skyway12.gif | Bin 0 -> 932 bytes images/skyway13.gif | Bin 0 -> 934 bytes images/skyway14.gif | Bin 0 -> 918 bytes images/skyway15.gif | Bin 0 -> 917 bytes images/skyway16.gif | Bin 0 -> 938 bytes images/skyway17.gif | Bin 0 -> 932 bytes images/skyway18.gif | Bin 0 -> 1004 bytes images/skyway19.gif | Bin 0 -> 996 bytes images/skyway20.gif | Bin 0 -> 982 bytes images/trash0.gif | Bin 0 -> 3095 bytes images/trash1.gif | Bin 0 -> 4171 bytes images/trash1.jpg | Bin 0 -> 5596 bytes images/trash2.gif | Bin 0 -> 3084 bytes images/trash3.gif | Bin 0 -> 4160 bytes images/trashcan.gif | Bin 0 -> 934 bytes images/trashcollector0.gif | Bin 0 -> 908 bytes images/trashcollector1.gif | Bin 0 -> 906 bytes images/ventgrill.gif | Bin 0 -> 923 bytes images/whiteHorizontal.gif | Bin 0 -> 853 bytes images/whiteVertical.gif | Bin 0 -> 856 bytes images/whitewall.gif | Bin 0 -> 856 bytes src/com/droidquest/DQ.java | 315 ++++ src/com/droidquest/Room.java | 355 +++++ src/com/droidquest/RoomDisplay.java | 562 +++++++ src/com/droidquest/SoundClip.java | 28 + src/com/droidquest/Wire.java | 439 ++++++ src/com/droidquest/avatars/GameCursor.java | 773 ++++++++++ src/com/droidquest/avatars/HelpCam.java | 45 + src/com/droidquest/avatars/LabCursor.java | 440 ++++++ src/com/droidquest/avatars/PaintBrush.java | 277 ++++ src/com/droidquest/avatars/Remote.java | 311 ++++ src/com/droidquest/avatars/SolderingPen.java | 543 +++++++ .../droidquest/chipstuff/ChipCompiler.java | 207 +++ src/com/droidquest/chipstuff/Gate.java | 310 ++++ src/com/droidquest/chipstuff/Port.java | 194 +++ src/com/droidquest/chipstuff/PortSignal.java | 12 + src/com/droidquest/chipstuff/Signal.java | 27 + src/com/droidquest/decorations/Arrow.java | 57 + src/com/droidquest/decorations/Graphix.java | 132 ++ src/com/droidquest/decorations/Spark.java | 44 + src/com/droidquest/decorations/TextBox.java | 27 + src/com/droidquest/devices/ANDGate.java | 181 +++ src/com/droidquest/devices/Antenna.java | 193 +++ src/com/droidquest/devices/Bumper.java | 241 +++ src/com/droidquest/devices/ChipText.java | 86 ++ src/com/droidquest/devices/ContactSensor.java | 167 +++ src/com/droidquest/devices/Device.java | 204 +++ .../droidquest/devices/DirectionalSensor.java | 153 ++ src/com/droidquest/devices/FlipFlop.java | 188 +++ src/com/droidquest/devices/GenericChip.java | 30 + src/com/droidquest/devices/Grabber.java | 164 +++ src/com/droidquest/devices/NOTGate.java | 158 ++ src/com/droidquest/devices/Node.java | 159 ++ src/com/droidquest/devices/ORGate.java | 189 +++ src/com/droidquest/devices/PortDevice.java | 53 + .../droidquest/devices/Prototype16Chip.java | 276 ++++ .../droidquest/devices/Prototype32Chip.java | 331 +++++ src/com/droidquest/devices/PrototypeChip.java | 292 ++++ src/com/droidquest/devices/RoomSensor.java | 176 +++ src/com/droidquest/devices/SmallChip.java | 420 ++++++ src/com/droidquest/devices/StormShield.java | 93 ++ src/com/droidquest/devices/Thruster.java | 219 +++ src/com/droidquest/devices/XORGate.java | 184 +++ src/com/droidquest/items/AmpireBot.java | 351 +++++ src/com/droidquest/items/AutoWire.java | 177 +++ src/com/droidquest/items/BinaryKey.java | 58 + src/com/droidquest/items/BlackCrystal.java | 54 + src/com/droidquest/items/BlueRobot.java | 62 + src/com/droidquest/items/Burner.java | 131 ++ src/com/droidquest/items/Button.java | 55 + src/com/droidquest/items/CamDisk.java | 44 + src/com/droidquest/items/ChipDecompiler.java | 450 ++++++ src/com/droidquest/items/Crystal.java | 122 ++ src/com/droidquest/items/Disk.java | 95 ++ src/com/droidquest/items/ElevatorKey.java | 63 + src/com/droidquest/items/ElevatorSwitch.java | 86 ++ src/com/droidquest/items/EndAnimation.java | 51 + src/com/droidquest/items/EnergyButton.java | 39 + src/com/droidquest/items/F12Form.java | 71 + src/com/droidquest/items/FFButton.java | 55 + src/com/droidquest/items/Factory.java | 74 + src/com/droidquest/items/GateKeeper.java | 113 ++ src/com/droidquest/items/GenericRobot.java | 489 ++++++ src/com/droidquest/items/Ghost.java | 193 +++ src/com/droidquest/items/Handle.java | 93 ++ src/com/droidquest/items/Hexagon.java | 50 + src/com/droidquest/items/HiddenCamera.java | 22 + src/com/droidquest/items/Initializer.java | 13 + src/com/droidquest/items/Item.java | 712 +++++++++ src/com/droidquest/items/Key.java | 51 + src/com/droidquest/items/Magnet.java | 52 + src/com/droidquest/items/MasterRobot.java | 75 + src/com/droidquest/items/MazeControl.java | 125 ++ src/com/droidquest/items/MazeCreator.java | 100 ++ src/com/droidquest/items/MazeLock.java | 38 + src/com/droidquest/items/NotAButton.java | 95 ++ src/com/droidquest/items/OrangeRobot.java | 78 + src/com/droidquest/items/PC16Button.java | 62 + src/com/droidquest/items/PC32Button.java | 63 + src/com/droidquest/items/PCButton.java | 62 + src/com/droidquest/items/Pellet.java | 80 + src/com/droidquest/items/Polarizer.java | 97 ++ src/com/droidquest/items/PowerSwitch.java | 99 ++ src/com/droidquest/items/Sentry.java | 422 ++++++ src/com/droidquest/items/Sentry3.java | 113 ++ src/com/droidquest/items/SentryT1.java | 179 +++ src/com/droidquest/items/SentryT2.java | 95 ++ src/com/droidquest/items/SkyGuard.java | 62 + src/com/droidquest/items/SkywayFlyer.java | 66 + src/com/droidquest/items/SlipperyToken.java | 59 + src/com/droidquest/items/SonicLock.java | 158 ++ src/com/droidquest/items/SpeedControl.java | 96 ++ src/com/droidquest/items/SpyCam.java | 61 + src/com/droidquest/items/Square.java | 45 + src/com/droidquest/items/StormCloud.java | 256 ++++ src/com/droidquest/items/Suitcase.java | 80 + src/com/droidquest/items/Sweeper.java | 218 +++ src/com/droidquest/items/Switch4A.java | 164 +++ src/com/droidquest/items/Switch4B.java | 34 + src/com/droidquest/items/Switch4C.java | 34 + src/com/droidquest/items/Switch4D.java | 35 + src/com/droidquest/items/Token.java | 128 ++ src/com/droidquest/items/ToolBox.java | 244 +++ src/com/droidquest/items/Train.java | 103 ++ src/com/droidquest/items/TrashCollector.java | 392 +++++ src/com/droidquest/items/Triangle.java | 51 + src/com/droidquest/items/Turbine.java | 121 ++ src/com/droidquest/items/UnBurner.java | 123 ++ src/com/droidquest/items/VendingHandle.java | 191 +++ src/com/droidquest/items/WallHandle.java | 157 ++ src/com/droidquest/items/Wave.java | 28 + src/com/droidquest/items/WhiteRobot.java | 73 + src/com/droidquest/items/WireTester.java | 108 ++ src/com/droidquest/items/XitTicket.java | 80 + src/com/droidquest/levels/Level.java | 997 +++++++++++++ src/com/droidquest/levels/MainMenu.java | 341 +++++ src/com/droidquest/levels/RO1.java | 1026 +++++++++++++ src/com/droidquest/levels/RO2.java | 997 +++++++++++++ src/com/droidquest/levels/RO3.java | 911 ++++++++++++ src/com/droidquest/levels/RO4.java | 1100 ++++++++++++++ src/com/droidquest/levels/RO5.java | 1169 +++++++++++++++ src/com/droidquest/levels/RO6.java | 761 ++++++++++ src/com/droidquest/levels/ROEndGame.java | 165 +++ src/com/droidquest/levels/ROEndGame2.java | 89 ++ src/com/droidquest/levels/ROLab.java | 605 ++++++++ src/com/droidquest/levels/ROTut1.java | 672 +++++++++ src/com/droidquest/levels/ROTut2.java | 1273 ++++++++++++++++ src/com/droidquest/levels/ROTut3.java | 1312 +++++++++++++++++ src/com/droidquest/levels/ROTutA.java | 509 +++++++ src/com/droidquest/levels/ROTutB.java | 435 ++++++ src/com/droidquest/levels/ROTutC.java | 371 +++++ src/com/droidquest/levels/ROTutD.java | 740 ++++++++++ src/com/droidquest/levels/ROTutE.java | 355 +++++ src/com/droidquest/levels/ROTutF.java | 379 +++++ src/com/droidquest/materials/AntiPlayer.java | 40 + src/com/droidquest/materials/AutoRunner.java | 77 + src/com/droidquest/materials/BatteryIn.java | 86 ++ src/com/droidquest/materials/BatteryOut.java | 78 + src/com/droidquest/materials/BinaryLock.java | 223 +++ .../droidquest/materials/BlueGridSwitch.java | 202 +++ src/com/droidquest/materials/BlueWall.java | 21 + .../droidquest/materials/CameraDisable.java | 40 + .../droidquest/materials/CameraEnable.java | 63 + src/com/droidquest/materials/ChipTester.java | 12 + src/com/droidquest/materials/ChipTrash.java | 13 + src/com/droidquest/materials/CoinSlot.java | 39 + .../materials/CrystalRecharger.java | 58 + .../materials/DeactivatorSwitch.java | 143 ++ .../droidquest/materials/ElevatorDoor.java | 145 ++ .../materials/ElevatorInPortal.java | 58 + .../droidquest/materials/ElevatorLock.java | 96 ++ .../materials/ElevatorOutPortal.java | 42 + src/com/droidquest/materials/ForceField.java | 71 + src/com/droidquest/materials/HotWires.java | 99 ++ src/com/droidquest/materials/Lock.java | 245 +++ src/com/droidquest/materials/LockS1.java | 49 + src/com/droidquest/materials/Material.java | 130 ++ src/com/droidquest/materials/MineField.java | 44 + src/com/droidquest/materials/Monitor.java | 12 + src/com/droidquest/materials/MultiButton.java | 139 ++ src/com/droidquest/materials/MultiSwitch.java | 157 ++ src/com/droidquest/materials/PanicButton.java | 110 ++ .../droidquest/materials/PeriscopeDown.java | 47 + src/com/droidquest/materials/PeriscopeUp.java | 61 + .../droidquest/materials/PlayerBlocker.java | 68 + src/com/droidquest/materials/Portal.java | 68 + .../droidquest/materials/PrototypeBurner.java | 12 + .../droidquest/materials/RobotBlocker.java | 35 + src/com/droidquest/materials/SecretReset.java | 40 + src/com/droidquest/materials/SecretSet.java | 41 + src/com/droidquest/materials/ShapeEditor.java | 85 ++ src/com/droidquest/materials/SkyGuardMat.java | 24 + .../droidquest/materials/SmallChipBurner.java | 12 + src/com/droidquest/materials/Switch.java | 247 ++++ src/com/droidquest/materials/Switch1.java | 34 + src/com/droidquest/materials/SwitchA.java | 24 + src/com/droidquest/materials/SwitchB.java | 55 + src/com/droidquest/materials/VendingSlot.java | 38 + src/com/droidquest/materials/XitSlot.java | 75 + 304 files changed, 35696 insertions(+) create mode 100644 chips/4NodeL2R.chip create mode 100644 chips/4NodeR2L.chip create mode 100644 chips/4ORL2R.chip create mode 100644 chips/4ORR2L.chip create mode 100644 chips/6BitCounter.chip create mode 100644 chips/Bus.chip create mode 100644 chips/Clock.chip create mode 100644 chips/CountToN.chip create mode 100644 chips/Delay.chip create mode 100644 chips/FullAdder.chip create mode 100644 chips/Monomer.chip create mode 100644 chips/OneShot.chip create mode 100644 chips/RSflipflop.chip create mode 100644 chips/Token.chip create mode 100644 chips/WallHugger.chip create mode 100644 chips/gates.chip create mode 100644 chips/old_WallHugger.chip create mode 100644 chips/oscillator.chip create mode 100644 chips/quarter.chip create mode 100644 images/0064.jpg create mode 100644 images/0065.jpg create mode 100644 images/0066.jpg create mode 100644 images/0067.jpg create mode 100644 images/0068.jpg create mode 100644 images/0069.jpg create mode 100644 images/0073.jpg create mode 100644 images/0074.jpg create mode 100644 images/0075.jpg create mode 100644 images/0076.jpg create mode 100644 images/0077.jpg create mode 100644 images/0078.jpg create mode 100644 images/0079.jpg create mode 100644 images/0080.jpg create mode 100644 images/0081.jpg create mode 100644 images/0082.jpg create mode 100644 images/0083.jpg create mode 100644 images/0084.jpg create mode 100644 images/0085.jpg create mode 100644 images/0086.jpg create mode 100644 images/0087.jpg create mode 100644 images/DQlogo.gif create mode 100644 images/FFdown.gif create mode 100644 images/FFleft.gif create mode 100644 images/FFright.gif create mode 100644 images/FFup.gif create mode 100644 images/blueHorizontal.gif create mode 100644 images/blueVertical.gif create mode 100644 images/cam0.gif create mode 100644 images/cam1.gif create mode 100644 images/cam2.gif create mode 100644 images/disco0.gif create mode 100644 images/disco1.gif create mode 100644 images/disco2.gif create mode 100644 images/disco3.gif create mode 100644 images/disco4.gif create mode 100644 images/disco5.gif create mode 100644 images/fan0.gif create mode 100644 images/fan1.gif create mode 100644 images/fan2.gif create mode 100644 images/fan3.gif create mode 100644 images/field0.jpg create mode 100644 images/field1.jpg create mode 100644 images/grab0.jpg create mode 100644 images/grab1.jpg create mode 100644 images/helper0.gif create mode 100644 images/helper1.gif create mode 100644 images/helper2.gif create mode 100644 images/helper3.gif create mode 100644 images/helper4.gif create mode 100644 images/helper5.gif create mode 100644 images/helper6.gif create mode 100644 images/helper7.gif create mode 100644 images/hold.gif create mode 100644 images/junk0.jpg create mode 100644 images/junk1.jpg create mode 100644 images/junk10.jpg create mode 100644 images/junk11.jpg create mode 100644 images/junk12.jpg create mode 100644 images/junk13.jpg create mode 100644 images/junk2.jpg create mode 100644 images/junk3.jpg create mode 100644 images/junk4.jpg create mode 100644 images/junk5.jpg create mode 100644 images/junk6.jpg create mode 100644 images/junk7.jpg create mode 100644 images/junk8.jpg create mode 100644 images/junk9.jpg create mode 100644 images/monitor.gif create mode 100644 images/skyguard0.gif create mode 100644 images/skyguard1.gif create mode 100644 images/skyguard2.gif create mode 100644 images/skyguard3.gif create mode 100644 images/skyguard4.gif create mode 100644 images/skyway00.gif create mode 100644 images/skyway01.gif create mode 100644 images/skyway02.gif create mode 100644 images/skyway03.gif create mode 100644 images/skyway04.gif create mode 100644 images/skyway05.gif create mode 100644 images/skyway06.gif create mode 100644 images/skyway07.gif create mode 100644 images/skyway08.gif create mode 100644 images/skyway09.gif create mode 100644 images/skyway10.gif create mode 100644 images/skyway11.gif create mode 100644 images/skyway12.gif create mode 100644 images/skyway13.gif create mode 100644 images/skyway14.gif create mode 100644 images/skyway15.gif create mode 100644 images/skyway16.gif create mode 100644 images/skyway17.gif create mode 100644 images/skyway18.gif create mode 100644 images/skyway19.gif create mode 100644 images/skyway20.gif create mode 100644 images/trash0.gif create mode 100644 images/trash1.gif create mode 100644 images/trash1.jpg create mode 100644 images/trash2.gif create mode 100644 images/trash3.gif create mode 100644 images/trashcan.gif create mode 100644 images/trashcollector0.gif create mode 100644 images/trashcollector1.gif create mode 100644 images/ventgrill.gif create mode 100644 images/whiteHorizontal.gif create mode 100644 images/whiteVertical.gif create mode 100644 images/whitewall.gif create mode 100644 src/com/droidquest/DQ.java create mode 100644 src/com/droidquest/Room.java create mode 100644 src/com/droidquest/RoomDisplay.java create mode 100644 src/com/droidquest/SoundClip.java create mode 100644 src/com/droidquest/Wire.java create mode 100644 src/com/droidquest/avatars/GameCursor.java create mode 100644 src/com/droidquest/avatars/HelpCam.java create mode 100644 src/com/droidquest/avatars/LabCursor.java create mode 100644 src/com/droidquest/avatars/PaintBrush.java create mode 100644 src/com/droidquest/avatars/Remote.java create mode 100644 src/com/droidquest/avatars/SolderingPen.java create mode 100644 src/com/droidquest/chipstuff/ChipCompiler.java create mode 100644 src/com/droidquest/chipstuff/Gate.java create mode 100644 src/com/droidquest/chipstuff/Port.java create mode 100644 src/com/droidquest/chipstuff/PortSignal.java create mode 100644 src/com/droidquest/chipstuff/Signal.java create mode 100644 src/com/droidquest/decorations/Arrow.java create mode 100644 src/com/droidquest/decorations/Graphix.java create mode 100644 src/com/droidquest/decorations/Spark.java create mode 100644 src/com/droidquest/decorations/TextBox.java create mode 100644 src/com/droidquest/devices/ANDGate.java create mode 100644 src/com/droidquest/devices/Antenna.java create mode 100644 src/com/droidquest/devices/Bumper.java create mode 100644 src/com/droidquest/devices/ChipText.java create mode 100644 src/com/droidquest/devices/ContactSensor.java create mode 100644 src/com/droidquest/devices/Device.java create mode 100644 src/com/droidquest/devices/DirectionalSensor.java create mode 100644 src/com/droidquest/devices/FlipFlop.java create mode 100644 src/com/droidquest/devices/GenericChip.java create mode 100644 src/com/droidquest/devices/Grabber.java create mode 100644 src/com/droidquest/devices/NOTGate.java create mode 100644 src/com/droidquest/devices/Node.java create mode 100644 src/com/droidquest/devices/ORGate.java create mode 100644 src/com/droidquest/devices/PortDevice.java create mode 100644 src/com/droidquest/devices/Prototype16Chip.java create mode 100644 src/com/droidquest/devices/Prototype32Chip.java create mode 100644 src/com/droidquest/devices/PrototypeChip.java create mode 100644 src/com/droidquest/devices/RoomSensor.java create mode 100644 src/com/droidquest/devices/SmallChip.java create mode 100644 src/com/droidquest/devices/StormShield.java create mode 100644 src/com/droidquest/devices/Thruster.java create mode 100644 src/com/droidquest/devices/XORGate.java create mode 100644 src/com/droidquest/items/AmpireBot.java create mode 100644 src/com/droidquest/items/AutoWire.java create mode 100644 src/com/droidquest/items/BinaryKey.java create mode 100644 src/com/droidquest/items/BlackCrystal.java create mode 100644 src/com/droidquest/items/BlueRobot.java create mode 100644 src/com/droidquest/items/Burner.java create mode 100644 src/com/droidquest/items/Button.java create mode 100644 src/com/droidquest/items/CamDisk.java create mode 100644 src/com/droidquest/items/ChipDecompiler.java create mode 100644 src/com/droidquest/items/Crystal.java create mode 100644 src/com/droidquest/items/Disk.java create mode 100644 src/com/droidquest/items/ElevatorKey.java create mode 100644 src/com/droidquest/items/ElevatorSwitch.java create mode 100644 src/com/droidquest/items/EndAnimation.java create mode 100644 src/com/droidquest/items/EnergyButton.java create mode 100644 src/com/droidquest/items/F12Form.java create mode 100644 src/com/droidquest/items/FFButton.java create mode 100644 src/com/droidquest/items/Factory.java create mode 100644 src/com/droidquest/items/GateKeeper.java create mode 100644 src/com/droidquest/items/GenericRobot.java create mode 100644 src/com/droidquest/items/Ghost.java create mode 100644 src/com/droidquest/items/Handle.java create mode 100644 src/com/droidquest/items/Hexagon.java create mode 100644 src/com/droidquest/items/HiddenCamera.java create mode 100644 src/com/droidquest/items/Initializer.java create mode 100644 src/com/droidquest/items/Item.java create mode 100644 src/com/droidquest/items/Key.java create mode 100644 src/com/droidquest/items/Magnet.java create mode 100644 src/com/droidquest/items/MasterRobot.java create mode 100644 src/com/droidquest/items/MazeControl.java create mode 100644 src/com/droidquest/items/MazeCreator.java create mode 100644 src/com/droidquest/items/MazeLock.java create mode 100644 src/com/droidquest/items/NotAButton.java create mode 100644 src/com/droidquest/items/OrangeRobot.java create mode 100644 src/com/droidquest/items/PC16Button.java create mode 100644 src/com/droidquest/items/PC32Button.java create mode 100644 src/com/droidquest/items/PCButton.java create mode 100644 src/com/droidquest/items/Pellet.java create mode 100644 src/com/droidquest/items/Polarizer.java create mode 100644 src/com/droidquest/items/PowerSwitch.java create mode 100644 src/com/droidquest/items/Sentry.java create mode 100644 src/com/droidquest/items/Sentry3.java create mode 100644 src/com/droidquest/items/SentryT1.java create mode 100644 src/com/droidquest/items/SentryT2.java create mode 100644 src/com/droidquest/items/SkyGuard.java create mode 100644 src/com/droidquest/items/SkywayFlyer.java create mode 100644 src/com/droidquest/items/SlipperyToken.java create mode 100644 src/com/droidquest/items/SonicLock.java create mode 100644 src/com/droidquest/items/SpeedControl.java create mode 100644 src/com/droidquest/items/SpyCam.java create mode 100644 src/com/droidquest/items/Square.java create mode 100644 src/com/droidquest/items/StormCloud.java create mode 100644 src/com/droidquest/items/Suitcase.java create mode 100644 src/com/droidquest/items/Sweeper.java create mode 100644 src/com/droidquest/items/Switch4A.java create mode 100644 src/com/droidquest/items/Switch4B.java create mode 100644 src/com/droidquest/items/Switch4C.java create mode 100644 src/com/droidquest/items/Switch4D.java create mode 100644 src/com/droidquest/items/Token.java create mode 100644 src/com/droidquest/items/ToolBox.java create mode 100644 src/com/droidquest/items/Train.java create mode 100644 src/com/droidquest/items/TrashCollector.java create mode 100644 src/com/droidquest/items/Triangle.java create mode 100644 src/com/droidquest/items/Turbine.java create mode 100644 src/com/droidquest/items/UnBurner.java create mode 100644 src/com/droidquest/items/VendingHandle.java create mode 100644 src/com/droidquest/items/WallHandle.java create mode 100644 src/com/droidquest/items/Wave.java create mode 100644 src/com/droidquest/items/WhiteRobot.java create mode 100644 src/com/droidquest/items/WireTester.java create mode 100644 src/com/droidquest/items/XitTicket.java create mode 100644 src/com/droidquest/levels/Level.java create mode 100644 src/com/droidquest/levels/MainMenu.java create mode 100644 src/com/droidquest/levels/RO1.java create mode 100644 src/com/droidquest/levels/RO2.java create mode 100644 src/com/droidquest/levels/RO3.java create mode 100644 src/com/droidquest/levels/RO4.java create mode 100644 src/com/droidquest/levels/RO5.java create mode 100644 src/com/droidquest/levels/RO6.java create mode 100644 src/com/droidquest/levels/ROEndGame.java create mode 100644 src/com/droidquest/levels/ROEndGame2.java create mode 100644 src/com/droidquest/levels/ROLab.java create mode 100644 src/com/droidquest/levels/ROTut1.java create mode 100644 src/com/droidquest/levels/ROTut2.java create mode 100644 src/com/droidquest/levels/ROTut3.java create mode 100644 src/com/droidquest/levels/ROTutA.java create mode 100644 src/com/droidquest/levels/ROTutB.java create mode 100644 src/com/droidquest/levels/ROTutC.java create mode 100644 src/com/droidquest/levels/ROTutD.java create mode 100644 src/com/droidquest/levels/ROTutE.java create mode 100644 src/com/droidquest/levels/ROTutF.java create mode 100644 src/com/droidquest/materials/AntiPlayer.java create mode 100644 src/com/droidquest/materials/AutoRunner.java create mode 100644 src/com/droidquest/materials/BatteryIn.java create mode 100644 src/com/droidquest/materials/BatteryOut.java create mode 100644 src/com/droidquest/materials/BinaryLock.java create mode 100644 src/com/droidquest/materials/BlueGridSwitch.java create mode 100644 src/com/droidquest/materials/BlueWall.java create mode 100644 src/com/droidquest/materials/CameraDisable.java create mode 100644 src/com/droidquest/materials/CameraEnable.java create mode 100644 src/com/droidquest/materials/ChipTester.java create mode 100644 src/com/droidquest/materials/ChipTrash.java create mode 100644 src/com/droidquest/materials/CoinSlot.java create mode 100644 src/com/droidquest/materials/CrystalRecharger.java create mode 100644 src/com/droidquest/materials/DeactivatorSwitch.java create mode 100644 src/com/droidquest/materials/ElevatorDoor.java create mode 100644 src/com/droidquest/materials/ElevatorInPortal.java create mode 100644 src/com/droidquest/materials/ElevatorLock.java create mode 100644 src/com/droidquest/materials/ElevatorOutPortal.java create mode 100644 src/com/droidquest/materials/ForceField.java create mode 100644 src/com/droidquest/materials/HotWires.java create mode 100644 src/com/droidquest/materials/Lock.java create mode 100644 src/com/droidquest/materials/LockS1.java create mode 100644 src/com/droidquest/materials/Material.java create mode 100644 src/com/droidquest/materials/MineField.java create mode 100644 src/com/droidquest/materials/Monitor.java create mode 100644 src/com/droidquest/materials/MultiButton.java create mode 100644 src/com/droidquest/materials/MultiSwitch.java create mode 100644 src/com/droidquest/materials/PanicButton.java create mode 100644 src/com/droidquest/materials/PeriscopeDown.java create mode 100644 src/com/droidquest/materials/PeriscopeUp.java create mode 100644 src/com/droidquest/materials/PlayerBlocker.java create mode 100644 src/com/droidquest/materials/Portal.java create mode 100644 src/com/droidquest/materials/PrototypeBurner.java create mode 100644 src/com/droidquest/materials/RobotBlocker.java create mode 100644 src/com/droidquest/materials/SecretReset.java create mode 100644 src/com/droidquest/materials/SecretSet.java create mode 100644 src/com/droidquest/materials/ShapeEditor.java create mode 100644 src/com/droidquest/materials/SkyGuardMat.java create mode 100644 src/com/droidquest/materials/SmallChipBurner.java create mode 100644 src/com/droidquest/materials/Switch.java create mode 100644 src/com/droidquest/materials/Switch1.java create mode 100644 src/com/droidquest/materials/SwitchA.java create mode 100644 src/com/droidquest/materials/SwitchB.java create mode 100644 src/com/droidquest/materials/VendingSlot.java create mode 100644 src/com/droidquest/materials/XitSlot.java diff --git a/chips/4NodeL2R.chip b/chips/4NodeL2R.chip new file mode 100644 index 0000000000000000000000000000000000000000..633cedb9287d3a4c7b9c8ccfa8bbfd79382de250 GIT binary patch literal 150 zcmZ4UmVve0i-CcG5eSjMe;@#Inb2vd5|~;Hx`e^jL?OSlq@c7!!7o20RY$=mHLXOU rBwryYGd-h(i_1{gGY=@qWu$AOke6SgP+FXt!ey#!0o7E_0Sxk0|8JO6FLpkTEbv!qL5!&Qczl=;Fq70s-qB;nVwOi tP?E3UlbTk-#bu~#qTmmf=Q7nbSIEmRQ7A1=P2sXo@XP~hDrW(i4gk5QBHsW2 literal 0 HcmV?d00001 diff --git a/chips/4ORL2R.chip b/chips/4ORL2R.chip new file mode 100644 index 0000000000000000000000000000000000000000..e73c6b17563b5ceb8768fb7287786a8292b057d1 GIT binary patch literal 366 zcmZ4UmVvcgjDdlHoq-VrGB7ZgFfjQCl{*3@8JIu>5HLe1238RL9|(w{3mNJd7$D|A zwF7N}02X5O!|Z{W(+JW6)(51)?f}wkAVHWqLNrJ%6u{hp;y>7y BU=#oV literal 0 HcmV?d00001 diff --git a/chips/4ORR2L.chip b/chips/4ORR2L.chip new file mode 100644 index 0000000000000000000000000000000000000000..f2e37bd02402905284589c89d2f0ac67739a8177 GIT binary patch literal 367 zcmZ4UmVvcgjDdlHoq-VrGB7ZgFfjQCl{*3@8CXFC5U@Zfph_V44+O-}g$#8J3=nge zq57GiG?*gIoJNoyu>DA8uz}dbngdh{QqKrg&xB3`<9fhFG^o$aPl6(c9)U*;#E<;=Y(h{HoE>m3#TThVEa!}AQ0RX6DV5a~8 literal 0 HcmV?d00001 diff --git a/chips/6BitCounter.chip b/chips/6BitCounter.chip new file mode 100644 index 0000000000000000000000000000000000000000..aba56b8fdd84329069d35d82fe75affd7ee9be09 GIT binary patch literal 2967 zcmds(OHRWu5QZmBleR7aRj6VcB-qm@s5>YdHmy{#V2>iv1)&s2*>MIgzzw(>XMp)* zTu5b6N6IQw*`u+4KbkMG=i`&S^n{4^osE&R_2X{xCDo@7%T@Z0sEvwkPdN&9cyv2l zydN(pTMg?t*=k(>wK{??w*Nf$HMwA9LwiZ?Y<`;_bDWujNlYfGHeVrt_g4iTf3!id#Hd)i8K^ymb z(2_z3JLh#(O*kN5w65&zV2)k*-Pj+`Y!-%-|7{yZbb<-kxiKG}z!g(Sg!N4;y%*8!1%Ef&#&cy?9o{NX#A{UQR Hyo>%fSU7m< literal 0 HcmV?d00001 diff --git a/chips/Bus.chip b/chips/Bus.chip new file mode 100644 index 0000000000000000000000000000000000000000..3b870a8a339c3833002339979c113cd31db05183 GIT binary patch literal 177 zcmZ4UmVve0i-CcG5eP8>OpIu{gdxJIv{=D8BeQ^u%g{=}Gq0eugv-cE!N0Tw#4?7n XOyDe2ILi#qGKaG)V61W$p!=8rLysR- literal 0 HcmV?d00001 diff --git a/chips/Clock.chip b/chips/Clock.chip new file mode 100644 index 0000000000000000000000000000000000000000..dcbc662cd737aef9e0f5522e5a1e4b388e6cc61e GIT binary patch literal 2899 zcmbuBNlwE+5JlSwVQA)gh5%u2Gm9O{o=6clU;_dPkRoM=#1Xg$SK|y&_1%>eQcF$B z9mU^O?f+77b=>*-c8z}5Id`1VaD1R4T1I8Y4YI?t;mj~cEazH1SHJDt^=}aA!w(IP z|Eq8A-MNxe3!H2ezkH73GyA6~` zTlT#bIOsc_V;x9eQ_6kM{&L0w59=W1m-z?>>xWq2$#p4>a3(`NSWhXx%ttsAfdigg zm(mCa>zP>KrTj7<;h^ut+2y+Ax|Avod}NjW?-@DpDbBu;1E1nFjU4zC=fKE;PjL>7 z9QYImzuQ!wWM1`4`h@2O@z#v>z^Ce2H*(-poDCxfKE>HIa^O>(Eh7g$#liDh`jOH| zzp!5rZ^2j(e5#&BBL_akSu%3qQ=DZZ2R_BY{+hbKG9S6m*x!jaZL9}ARnLr(1E1o| zj?VdD3w(-$|1t9YQ_27uyr=Vi&dU2SEANA>%wy&I&dTeYm7h;p&waL^U+$lp?T5!# z?~ChZk%yN*p`gffdHYk2DM1-N`ZL6Q%9+BSmoXB^6#gQl%3SU*B@T()Ukx&n%KQ9J GAo~TxjZ-ZE literal 0 HcmV?d00001 diff --git a/chips/CountToN.chip b/chips/CountToN.chip new file mode 100644 index 0000000000000000000000000000000000000000..1ce1997054dafe856f41a5bd2425348b80d5eb03 GIT binary patch literal 2691 zcmds(%TB^T6ov;2BI5-W?{4bC2f%w+m=Fw!8%T_AU`TW!-i9=BVd8W63ci}ppyzAn zl%giEkcIrD{ZD63&$J(HXWlR?yC@KbRL2^z*pzAlt986l}FGqg{%Tl-G{$ zP63LVgg1ABxElmlq`X%p=B^jKm%MYqw8y+9>NA(dRAiw4#k)90-f%;3L~upQdre}f zmAzZ|Fe+P7?>l6 z6-?G6ul%FBQetI<23AbN>PS8{P__+GI3U38v0&hFR3cF&PgwFhauXAjeO-yWs$fjv&+Lwl0OM-h|h F%oq9cAin?r literal 0 HcmV?d00001 diff --git a/chips/Delay.chip b/chips/Delay.chip new file mode 100644 index 0000000000000000000000000000000000000000..0c00177aa011f0c4d985d8776f2304d12fbf543c GIT binary patch literal 695 zcmZ4UmVvcgf`Ng7gMkqR0)-gZN*I{@gUTJjY!Cqi><|h<{s#gOix6GNP{+UkF$bm{ zW)34U`eEiHnS-JqXa*CR=79A9^}@_!Ces`g{XjEVNH?buqy=UUSU-@@N{Tr^wQL~u zKmek_VGE@}Y!C+d7es^n38F#vfM}3Cj3o>UTvBrqD;1nGG7Gr446PJA^9o8!xQwh6 y{7XxKEQJ)1bZUx%A(t_Rm=Tu=hL|yzDTbH{ml=kbDVI5hm>HJ^hM0Ld*uem7MY)s! literal 0 HcmV?d00001 diff --git a/chips/FullAdder.chip b/chips/FullAdder.chip new file mode 100644 index 0000000000000000000000000000000000000000..fa36c0f10b13dc6389740a5db224eef4866168df GIT binary patch literal 684 zcmb7>O$x#=5QQhLwK`{Tkt6u8WS1(68wFP$pe}?WDk<3s-p8wX2FGC3QkbP&-c7>I0thYbvOpR z%{I@I-S51a-)UHfLwQ8b$@am1r>#01x9A-Q;)ju+%BK%6;Ga?;&)!O(Yj{EJIvkoU zit}Wg;(qU2-7N8GmL4t)EEj2#NFB%f3t~^n)$x=Xsj<&(gadA8I8-=NI951OGCCO9 M#cAI3Ed3b&1y%>TWB>pF literal 0 HcmV?d00001 diff --git a/chips/Monomer.chip b/chips/Monomer.chip new file mode 100644 index 0000000000000000000000000000000000000000..1924e1f17e47990238838fdf0d4e73ce8be8a766 GIT binary patch literal 1304 zcmbV~&rZTX5XQG4{#n##n1fdipnzAR;RwcfH-#2h({}52p)nyQo_!Tx&1cY=-4>ye z6d00zGrRNscFXkZo7K`Q#@Hou=;xTH%~us}v$|%L;bYpP{DK~9;ZXjAv5UU4cg8k3 z#*g00F8=%+&8oe@y#-ath+zPzbt>}4GDXl}_+&xkqcFfSV{xC}tYSGw7Q;Acv9GKq zj$=9IMG#>)sI`4~II(`;a*PkXXXM8?wqhr_%Y6zH%l#+BDf8$1TPAP(h&VrxV|?h% zzsS@5IUi)%@MCTMr~KY!N`NfP+_U~lQL%@(^tI=B=&k9e%xay~}TC-7IHpofycYhio64SDb3LN1yjL`XtLI}{`&j{ctaDpVR0=*9=G-yL3FeQC!>!KQzq(=j?=XJ~;01kA6JAmPg zENE=i>%;rv4DETxs{1FWuE#P+27Nig)Wvz!d2!ucmFlvbR)4yl=Y59rpb}aa&;PqB z0jyC!s7G8M^_kXmZ={?rJuF(+aTQ$B{3H+ARmmtj7l?CT?(?ElGQfo|(^8rFlHDP$ Z8h426W**^&w?w#Y+%fLh9aq$H@d3*M;MV{E literal 0 HcmV?d00001 diff --git a/chips/RSflipflop.chip b/chips/RSflipflop.chip new file mode 100644 index 0000000000000000000000000000000000000000..20a097e84b0493cc846cd35ae470e649302278c2 GIT binary patch literal 715 zcmb7?&uYRz5XL95sXEW#VPBvW|F-N+5TO?X>Y>*jmLLR;bR{>z_vx$k8Fao~N9ds# zzraj(cfQ}wZu0X>S=}QdrUW8+Zc(PG?WwiM*Yy+wRf3nZ=#lIx&6klA{NnAxFG>-b z@}!~ZV)nP801!s&5zwBFM3M6ZpD06U+KASHlSWSP3!)8<=ovxl?qxaHr`}LFhyo-B z;5~q@$Ag`)w>HwjK-ZgQc&-W;boHhGWvRtJ_`29P@#L27+xgd(^JZRds+W1WtC;)N xd~B7tIOaMQRSm!w;Ks3x92NI<1;Dd7v^YS#sq+k#Pr8y3wxAat z-+=M$(i1Phi;}r9vU=#*KpRqH7arjZ?q46*`sg3*(i5*9l%$#bMlBiW2T{X+(GEwT z4QW5C#~3$_93jTk>j=1H<&GD@a$VQFVr&!!i{j7-_1#o_&kMoER9f+x3-(Uwvf`(& svZ({@z&^q^HVK2Y5hypc=|le6=Gse76?s)Q+nmi>t{r{POWcq53#dV^TL1t6 literal 0 HcmV?d00001 diff --git a/chips/WallHugger.chip b/chips/WallHugger.chip new file mode 100644 index 0000000000000000000000000000000000000000..dd77ae89806238e51a4281c5e329c8edb2736279 GIT binary patch literal 4187 zcmdUyO-~b16ozkG3bfE76u-ZUBI=?Gzuk(4xG<0q5)*eWu#iBgIHWt*?p*o{-1%Sp zCH@9I&pqePR5~-ACXKAEAGxWQd;7iqcSaXE2xgUB&A4uSNtk)7#%<$k#?9FFz_RSgB8j2Tc5cS5 zOdHP&b1(3ejmyTh$W>l!zUr^Y*rOuH^6wOgaC2)%g;=blX#Ay*?z1Z;2GLHXX(LzO z+D`0MMK_zK!(K&oyd7^=P1A|Jjg92FczjO&8>h7c_Ts3V)-Xm_R(nLPo~8-9QvZ%f z{PT$He419SSFq_cGtM(XKxDv@l3OsoB8=~D7_S-MGM3B;nMi7A?wJdaGov992IrJq%lLxvZDD+O)A*|KUE`+a!*G81St2rE1DuhXQJZjP z%oWd!;ECLtVfIF5M!jHW)W*+@rUuL{8ZR4D=Kw{BcUdvMZhYBTG9%Q9|EXp)CY%`y z#WO=3=aHKkW^ZI>Gz(@%W30^h#sb@Zl^S_Y*(CtA0^Cy?V!nMcW=4*KewTnLe^hh9URb)QT|0`ZeM%i7V_;Cq-TJ`FGIRc##x>TbtCz{P=g`P@rKUOW2ijL4>m$w4Am*@ zPa#`EeEe!6_vP*TgM;?#lWuqSxL$wI**WU9clM4?K1DKq*m<-2A!@Im9QI`NNJsJA m$DQ?~C^|X}_n(Auta#el-tX?k2A}mPR;jOQ27tV8rBN{ literal 0 HcmV?d00001 diff --git a/chips/gates.chip b/chips/gates.chip new file mode 100644 index 0000000000000000000000000000000000000000..a3aeb9ef76ca3db7f667cbd6dfdf6672a4dd72ae GIT binary patch literal 509 zcmZ4UmVvcgjDdlHoq>^&kpTf27+6XenEm`i${m5SaKH#+{RaY4XrMukel8G$n4v~7 zL1`A!3}W&R!fp;LY349T01avc=|Oi88z}~X)ItG@InWRSc@ktEDAYg>1koT5gJ>`= zVJLM^EJ-a^a7oS0=i)N7Qt-?xC@oQN(NCLo+2P(0EivXik!Lc0d3IGo)gl+%; literal 0 HcmV?d00001 diff --git a/chips/old_WallHugger.chip b/chips/old_WallHugger.chip new file mode 100644 index 0000000000000000000000000000000000000000..fb2730d95994f38ed1e43d5a46054bbff875278f GIT binary patch literal 3347 zcmd6q%Wl&^6o$u1-89anlsh}KK!PPLm&&`gP_aO*R7L6T!;5OTHti8~d#!)@^Y9X-OOjk{G=DBeuv(UQ-hFTMtIu3RUg=B6>>P;U?x#Pu9Mw zZ_4@0QMQ(4h(lFBI(uipI*_DR4tRFnGoUc4z6c_ZH`fhEFTEnJX1ErdBzF-jJw81( zoGT0?vMs5TWivg7X=EAV4A&5@y@X@78SR~X?wLF`jQHjvPVybzt&GyF!X8jiEKg~> z@{HM|?|9ma@5)`S%}|g*&OL2uti@BvrYp$*|t1!EZ<|)nYYOMPx z%&r?7wWf7$O=-I&mDXLe(o#JxR9cEFR9eg}Ra&Q{(#+ZCNCcx#0C;P6_`$AQ#I#<*g-z6$m5Wnrx07{|IQ?P2aPU0(csf(q^7 zoQ&BsD@V;0>-kO*PD7Y3Fa9Ax+4cyEP8d_WLNQOo_B2NSi0z(9{lt1@3)PRyPvf!w zVLll2XP);m@OzV~-y6>6*P&$W2mZ(Ym(V|+Uri-Eh{NRhtH3{=gyH1M60ehtgn1MA l7o)*2spPGV6XMXkHGYZr{N#oIem45-U-rk>!$|)TxdG7h>;(V- literal 0 HcmV?d00001 diff --git a/chips/oscillator.chip b/chips/oscillator.chip new file mode 100644 index 0000000000000000000000000000000000000000..9bc0964fbfa2bfaf6d566c10170ab3bd89ea10df GIT binary patch literal 195 zcmZ4UmVvdLi-CcG5eR`~2?MjAe@J;Fkc|rd0|7{cSQ@IE5vrbvRJw#g(Z4u3Gbbmp jB)>?(IU}=xi_6eT!N0VmptM9GI5RyjF{hjbXbU3%s&+)( literal 0 HcmV?d00001 diff --git a/chips/quarter.chip b/chips/quarter.chip new file mode 100644 index 0000000000000000000000000000000000000000..f05fbe045f3921155aeb0d713e01dd94a513368c GIT binary patch literal 1212 zcmb7?%TB^T6o#kZjq&mfXJOnGgW_e25`qiC3kmB2rJba7a5}YNW8(Yx4nC33py#wR z1c*kME>36W|G)Fkv>#t=J3D5K9Wm$62e(;8vvQ-;%o;SYqikMERKIboQxVkZ_6m?= z06Az~fYrUQH^!C&S>Dz&&$h|6w+V;xlnTzS@$ZM89jx19!ouQGQToIoHkTvi}+`A{n554DgnE*2+9 zV2quroY!0nD}wPecQq?NcXcS#2u@%uQ-%FaCtm++U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYw|7ZAe`c3@D_y6wwXZRZbfp33%)u(vQnv#!lv%jr>`@??wp0o4( z&&zI~+Pq_urv^_djg^_I>8Je)WH9LeZ5LpSIT?C{I^j z@4N5oPurNq^8NxJcC1*r>$bnA_ucTCbwRzm)T?82i$DDODVFXo_95cLs!8j&e3`TN zX!)t98qtfU8;3{7-Fjc6@}Hr#`#*!Q{SW{D3@@kO*#G$c-@X4CUhRJ%ThI5U{?Pm% zrT-b6-v9HvQ~$A~Ci+L`e+CZzZ|Q$L|1)faKd7HxU|?WH~P|HRpk z#Q&1m|HWyS01mIljG*zis``Ff$z#P~UnB>N)LX|1%t_{kt6K&i*&=H~ftM z^!C~N`}_YcJ!V$@b=_xV)wN;f;%@6ITNkreI?sC@tIxgurF`~`$1B1f*~rNW?Rojz zFExF+iEy0X>kW0+_J7v-&v5(xzl-bH*RQqH{bT)~q2>2)U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYJgs=j z{@M4sJ&V@X$!>XBe6k+ht_QDQ`?t*J`_J%@@!#eD44ucn_21sJ{%6^zZ8`V4{Oy05{~21;e>BdGq%6_s7zO&6n4`&$3Ui)jv`-{oDI*>|OO6YW8pbdH-hhP{AV~4|4Y37Q`!Ch4BhK1 z{xh_e|Ly+Ipv1QEKLf}5x&ImD_rJKG``gX#`LAo%W>0^W-aYRauX=I9mBsP5>eEa) zR>ykj`LFx-^z*$^lYg@~ literal 0 HcmV?d00001 diff --git a/images/0066.jpg b/images/0066.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b1753ab4a8cb6d88564b64760624ff40c8deeab3 GIT binary patch literal 1190 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY zu8I5kpW)Um@o!;g_r?E;@_m+W`Fn9sLTzze_{0AUt+$T8pZ|BQK3MkDRx~B z;a``1)yDqeU3tgP{~0#r{5$*n?PvR{_q+27zjq!Fj$cu*PFUWJGi1p^*6XgC`5(2- z-h8_z7JsJy<_>k%nGatc4O_JGVBC9;Q}yCU=ETg`{!!XG`M1Z@8pqnj_kPNM*sw+a z&Dz=fj{ckWxpL<5ng5m)_Nd40e7v_}Yqfueop{FgeeU0U_TP*)ubi)a_F1~b@AJnD z>UOSU{wMmpr~U>1e}>71^&dkYd=!hHd3CK^mCgNoUC)Xx*7zCr-PS&4RetB^Jnd7P zyS_d?-~Mdt-yeFJ-mV{a9J9`qK4cYNdp`5Se};}NwbkeUo!s-=f8zEte=je)d-M1` zW?No4g?-m__VmA*%l$jN?!EC}UByoydukt^E2^8ZUi%~ap|?q=Py9PM9W43Oqh?RC zeC5w`{+C5pfBetzFJb<-`~Mj-uU`&1SNLUv>GJMH53Oo;EnD+*zT1^)UDto?^ZCuS z^Iy8V?vaq=0VU7B$w#I yEzYlswqEk(nswIP**|3~*JaLI6Z0bVMyST2>r>`U+U0+Dci*k$>G~7@-vj_2c@L!k literal 0 HcmV?d00001 diff --git a/images/0067.jpg b/images/0067.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d2742d808c256bcbb9421a3e0e71401776c38528 GIT binary patch literal 1126 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYGZ z#qVzKw=bDfD*C-fzIV!Mx2DC5_C8s+%k%fQORR7h!@}D-2dq4mj4c~d%v-Mk&RuP;j{XcHqSM$FSB?bryI2oY~N4$ zTi5E-K7X&Q-|K#NyX5aBk5{Z&_4CeaX&u*8$&26eY~MY5H~pw))}Qs8%ItzWia8&> zUg6iisqp<7p!jjk>P!FLe)GF6@A;$t@GiUN=l>Z}ZUP;D`&r%B`(<|?zZdRXwl#a| ze}=B(ZvPopE~!`tj%c%j$XeeVzKT?zj7YL$IYnUl10 zzB|V`z3=;Xo=yAv+WPkXb>aU+pEvJ+!T+COveAErkD;p{alcJEed6CqkUj4{+h4jQ zuP<@@p3HOgmtCj+9sbz=m*4)UXZN3MpZtw$?K~ge4VQm+?9|^mxBUKAMsMA^t!-!j h)sLdKbA7beJpOy*X54M7KF#~U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYG%IL1Vvlk zn_GCf@9TScPSf*m*T1#@v2OoEtxq-Uf42PXe)IGG8}oO^A8x<5NB*BU|B?J(68k@S z0k!pBzqa+~bWv|XzaB9??Rn+bjB+!sU7Ql#H|>YYy025e**ibnababcKezfx=}eW$ z*M9FfshM5hrFUC9ujb;T_YxIFkKgS7Fd@tS!zQ!$pX!U%CV!LPz5AX1d-IRi-~FtA z8$K!g+J3RG=ikJ?IS+D>=;uB6fezaKR^sNHvfT5Jci#d!NT|Qv{)>10r~QThMBf+u zvkE%=`O-qQ`Dtr+zqo3l|GRDOzpL~9=~Xrdu0I*HB{=r-zSFCUXa8r|{`T+fwY$%^ z%xB;KMEySl=YNLw`sdSc?7v)p|Ng&a{@<*nftH$@NDz{}bTIey!J zhU5ExOWR+sKk%#0cJ-50FCTPViKyHe64bqQarKVZ+ILI#z25iSUc!rSPe|sLtM9cV Py*+N7U%Ty-{r{T)NB9Is literal 0 HcmV?d00001 diff --git a/images/0069.jpg b/images/0069.jpg new file mode 100644 index 0000000000000000000000000000000000000000..723e79656a5e590c84c284f0f96e54a644cbcf15 GIT binary patch literal 1240 zcmbW!e^Aq990%~vm+!_lK*yI2Mu=O$3<0qagy60?r69bD_+c1Go)ApXm>@YoWT#+g z5`;jAq8uqv-pMZ+Xg6C9(10Uipg6d(Cco4ezoug_;OUEYb=N;-@8_P+KhNiR?(@0_ z-ABKH<&MDMK)^5nj9h?*AONU1g+jrpWT8^2rZfvWjSSP=oMAyQt*i(pL9lG>IV`rF zH9^=q*xIdM&*Sk}97nz*mv7JIaaSL~$g4C{+FCk&EtgHOxi1{_6A*NG8SHV)5ljdS zCot3oJaSGd_AKycFcX|YPDy8&nUf6?OEAH3+=QH;1d!cF$#b9(R4WIMZKkZyy)?%Z z_LgHsRdlEA4Y#brdT02av8l%yW;Pt#m+UsY;=Iwt)oZJ_&+EQ^0dKt>81zo?j_`<` zA4cx_C@Sug_yobe#H2%MpB)yZXJqE&p7=cPuLEhTde*4bP9i584{=4@E?kfj14@O4E#wQ*=dOSO)d-7C2Z&+Adbzy)% zXOZ>nB& zgfYxt4RLFPnbzzQQKMu!yW0mribIXEFMPa^liu1|#*0Ugn-hxQL{W>l*jVmWS--4O zr-(CT1u{_=f~0z}CL}8mL6r!B^QQ<5W0?b5)(Dd@gc!|Nh~=P3ags6Ug7NIAs-<&i zzJFw0VMx^69>Z>bLiR8gL5G`o#pmOD;hW^OR@U_%xp8hwsl`gkIc$>gfzpU_R1mI%vXu(1IAaCOO@(iu4*`W z`g*JHpxF zhY)ZPXeSZGAiy6P^tC#DGlFu#$}j@`mnjLmHa^fTrZup_Yut>|UuK(FcN4orSDGgh zaN8Lr|M3So`6I$3rBRXRl}{V{VhVIC?mg{=i}?uR#RF~J$nyxYrh3Yz^AC5Y`!Bgn zpHx5Dj9^qNLtuaD-)5=1y8kpMzwKbRAYe`C`^Oo_6?NkUQg53)OU2Fx V%Y)}s?fmMaUddXeTLup){{VMeCJq1q literal 0 HcmV?d00001 diff --git a/images/0073.jpg b/images/0073.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3a07ac7800b2ab00e5b3c6044ed88e722895dd6d GIT binary patch literal 1143 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYneLcZq*n_jiBpe+KW0nmy^K|1-o`o{L}ZQ+#WG%;BX| zAKjG-Y{@JOoV`+4e_8*$v#+y19j}((ofvd-<9U83k%#V^dfmgK;(g_}Je_>)&Yg|- z4nE=+tTDU3r~hp>$VGeh-;Ghbd*l3FW?RJ0xgEI9tp+x0)gk?Z@z zr~YR^w)v~q<+g&IbNREse!KfN`}FL+zjl|HJ@_M5*!u1MtvtU!d-hy<_AmQ(c;39_ zj34WdL>+7XJN@tE%5VAh=RVt)^zY6)Q~RLs%5}#74BY(3?7v9-XE>R$|HrJa{_;QU z{|W8iSbyaBoBGtx_D}m~?k>Ckt<7-z*LC6lMA`rP*#A`h&v5hl)VU9gPwjYlp5y78 tyK6IV=B!_C^t!IS^GIa6Q23cuAqP&?oxF8z#iD(pwU$%2?sxuw699oD@U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYy+v4|u^o8s9A1vtO^}q4xBloR( zov2-}ubO??d^7rd@mHSRjRjoGuYSC-&gdtfr|2o3pM?3 zv+Xxm{@%0y-r{$+d;VT3yb=~#{r!)QJ$wCy2Y{Q3T}dft6suZC+s z{?EYvpW#sWH~k+o{`SAwm;PttXY;(<|1KOe`?vKJP-X#8U;BRsmHof1&XpF+$YusF zbiC3wEpJJ6_O565f6l(`t;>@YezrjLxj%2))TpY+Q){ZT^HQGg{v9;!R%Ax~|C<21 C^Vn?w literal 0 HcmV?d00001 diff --git a/images/0075.jpg b/images/0075.jpg new file mode 100644 index 0000000000000000000000000000000000000000..044ee35c955ef377c29255cf0af1f9cd8e665ef0 GIT binary patch literal 1036 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYDi`BdkryJt?`-R~;an6 zpX;W3y1hF0`poN77GYB|Et8Wg?WW(ZTluYxm@Qe;p%Q z_B2M)FQV+@_TcHRdvfkaZ+W+N*X1iu&g|HhwJXBfV%=}AmnECB&iyU5+xo-vqwqiB z_iycgO#aW1UfX=?Kg0C-=5>GnGrU=6xcUCt@~t0otIz*2@&D`jpW$cFe}=cAN9PvQ uW?TzC;P$arZ@TWJ*P5|+@BWmnbQcYpsxFhWR`uHL_ZM|_7k#$>e-i+J9U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYHVkrT9xYZ+`Hc; z(yiU&y*~N>2(Ra>VgApc{BPsm#ozuj{P^^r!EHx(+WGzemd>`kH@EO|-`7tPdWMG{ zC8qnuUH%#LEdO%uv~}M;?fh!7Pvl7A(^891^~N74{xp zzqV5SkB)!4o!x(iiT@eg|DF5I{-?5j$sOAKcQOFMZ%g)aGZ0&mJt>ZuB#2{@U9=r5{=x X7xc2(`e51bKl;xX#}~yL|GxU zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYcKZuYnMAMVfp-TQ3*^S(;iJwLOzzdy;| zJo)l+{$4q~5B2SK;(w?A6XLc0C-k4;t?fVm_e(bZHlMz|{7%~a-DhMAd-r~h(=qUHwn;_P^!)f0q4c_;%}DjQ>}~?WJ{X6Cd6=6;u#1_xh}Dd*{CS7rs51{pfw!8uyj8)Bg$nu-{O# z_h0#W+4FPf?ymcjoM%u~diSk+_nyRu=ey)n|1-2S2LcJ_-^TTmf6vt4cllZF-S47h zxu1^5JTK1)pA;D7tZ?As(-P&A8uuJHt!|FXNFC;NzGoqZFX*U z`Nh>=cfPLE`|hksF)%&%#=e13Iq;txsI5hVDq-}GjuGts1KluMm E0Cu~&H~;_u literal 0 HcmV?d00001 diff --git a/images/0078.jpg b/images/0078.jpg new file mode 100644 index 0000000000000000000000000000000000000000..528b4970d18e09e752200fc27f27cc76a652d2a3 GIT binary patch literal 373 zcmex==$VSiD#OVJ425t@p1qK;LMnQ)E zM;OFG<^v5!0Cu1qKnX(u1_mZpZe}KSxRekR8@r$gBQp!Du&B6U*pkc2MuB3gipC~p zE{RG1Z!vIy46Y8Qgm$lql$8tZ81*@vVH1q&rstW|6sDs<=eO1 z6<&z8s>TK{TF14IPh;BM%#(*jpT74Bw>X*lr1*!*d6RG7CZ5m{N}p9-?eT>D--7h1 z;y1jHFVo$(`BtXLjrOvdm#T_!^CD+Ip3=xT)8vlZUfV_Q8#eu!9X#hh!y&yw`^s+V z$Y%?023Z{KUGq8M%}SYM1vWOZ-P)^4|JGj!D|zy;*oC_tr=Cm7{Av8i|NkZc D4Oe=} literal 0 HcmV?d00001 diff --git a/images/0079.jpg b/images/0079.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b0c3cb4def95aaae3256aa93ce743f319dacf166 GIT binary patch literal 386 zcmex==$VSiD#OVJ425t@p1qK;LMnQ)E zM;OGw<})Axb_NchxTOFC0}~53GbblpN{C%pM4XX{nT1VIR4i=CWy8cKR%KNqN4LO~ zW_4qeq~z3+#!3HgF>nAK%wW%O{&D`b!$O0L7RTV@|(GAf^|S+H+%`jMI^-|tl0*ESV- zeCAJ2mx9x^D?ST6SuU0ItzyQ%_o;O*cZ2RfxVrj&XzbMH@3%{LAFh+CnL6WGyq{>h zIj4CG`>lRMKCi-MMhw^AZ=$VSiD#OVJ425t@p1qK;LMnQ)E zM;OFG<^v5!0Com84xogg00RRPDdvFVwTsg9glDPjr;NHeetn5vo+WAF4UB|v{=re#(DiGuk%*b zdzVzQPKyw~u)21}zMu1EetkI0_Q_Mls5wfxA127Z`8zKpzBce%((i}=q9*!Qr0q|O z^axuhF}p;SLsB(;uI;@`HcjVl+q{xHHSw_&Yhqb=xcC~T4K<~z-`R?CmSvVMR*ni; zcq0Atw)0l)o0e1@{Lk?E_%{UxX4ckqr(VtNPyX6G`|{rNY()h}_n5V$CiC=EHh$#) Ge-i)-c7BNf literal 0 HcmV?d00001 diff --git a/images/0081.jpg b/images/0081.jpg new file mode 100644 index 0000000000000000000000000000000000000000..090104f20e512e4dd012a30415b2dd470ab15cde GIT binary patch literal 368 zcmex==$VSiD#OVJ425t@p1qK;LMnQ)E zM;OFG<^v5!0Co;Gkc5r^0|OHqCkrz|QizF}ja^WLk%d)QR6K0SWo1L7K#8=akN@9d z-~gFn&oKXJ{UpE7{`uK54UNAHbzaLhJP@mybLHsw$fUz!Z}w#db4cplJMd%uC(nDC zZ{H?Q$dGJPotwOD1Gk-D#`L?X-8>P~&uS$ytKPnG{>kJ$mv7%Xu3-P;^tbnC|1D&; zj(xW9W|+mX#u>RYuN})~*rKlLS$i>J&9cs#i;E1kV)yd=E8Bh6dDEK0zH`?rSCobJ m87gr7XMk!u$ovJU?KtBBUCxt{-S4`NrkdV_>SO%)|0V!1O@1f< literal 0 HcmV?d00001 diff --git a/images/0082.jpg b/images/0082.jpg new file mode 100644 index 0000000000000000000000000000000000000000..24275612d217502d7c85bf64f4cc06e5c8585104 GIT binary patch literal 940 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY+J2=^X#ZL^dniGz30dFkHY^1&|)q?Pa{{5ecswXLc=>()v`k>0++RuleCeEu?<@S+!1{ aUoP|Xv{NsEVmEX8__{RKr~G36e-i+pTY4Y> literal 0 HcmV?d00001 diff --git a/images/0083.jpg b/images/0083.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4d873c20689947e75c00eba1bede7fa116b9b318 GIT binary patch literal 999 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY4_p6dxbpBn!<75~ZpZP*N7bnO=={&X`Tg7cKc4>?Ht#$9wEpz@+57AMGkgn| zxcUCtKJ(7(v>V!w3a-|dUyZVRcQWhU-P=Fq=YOnIwmH4N`%u{5>!GLl%O84&m+Ph7 z_qFBY|0j9>-*Wyx%YY`_`cU=WPWO+?e}8dK|7XY!Z@#{#{;*5^mHGb}rt1H@8gs|nUA*g%jhWPRbF+6Zqt2QxzW1M@ z@#N7THD$(3A7*&j{Q12vWoOQ#YyH))uR9-nvF`Ju`$znN!L`}`kv}N3%>TvJ-2MHn zeiJyb4qo5dvNCF|sMUohlkdh_XWy-Tejy<{e65r5k>GE|<$Lm$=2owjy|(=SO#sB; BqEr9? literal 0 HcmV?d00001 diff --git a/images/0084.jpg b/images/0084.jpg new file mode 100644 index 0000000000000000000000000000000000000000..110325eb9fa6305adb65ac7cfb45deee192e8dea GIT binary patch literal 1000 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY=O$z4zVXT8(R`nGMasfB%a zJ>P$Zhm8Nu{AcJq{;mJ^p8G$`K5fgn`R{VN_1|6L?5?736E&|bb#>bE^U3xyuV3Hd z3%^K6nZCHtV<>97VjQ{lZY0l04 zf0vyr|6Q`4{fFmA;eP`1Z|#3f{?Cx{clW9P4AbXpr=9)J@Mc@_{@Y8-=YO~;|5g1z z!&C473|qrbebkk?EnQU zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY%9I-)hj>$X&w(hkQ!PjQCW1( zW?PwmrRufUX%)62fpI6luvdPV{P6xC_4~K#KU(}d_nUv}e+IpKd4GTZXSfxUoW4Km z*QGu3|D=@vE&0#zXJ!4jRrU`T*}wAt&v0t`e}=5}XFjjlZF4qT^IY$uZ7~p7rZZ`Fyc|vi}(l)&8CNpFz0)&HD{M z_kVi(?EU@Cf0rIJtNyxv((8LDHY`TA`%6*8^O?EgZWVPEYp0utZq5C^_x<(cs}Em% clnZox_`LPogm|v!EtRFY-}Bynz48Ah03L#b6#xJL literal 0 HcmV?d00001 diff --git a/images/0086.jpg b/images/0086.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8e0475fd96c397bbca77031c91edb44859a671bb GIT binary patch literal 812 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYD2>0^f9`z=rYO4@tpdizGp6p>e_bnVW^&6S;fe^J@%c^tH7 z!R5EQCEMN8zW>&|y|!nS#-csS&-z1tF#cyS-2XfAKf_k-Q?FljecIpupW!phe}--U z8GificRs&Ke$`Wx{|uG&$#t_opR9bDKle}n)gANO?3Pcw^!M%GcJrIt&26sFoA&em RiBG#U7VWpO*R=nC69BUvGl&2H literal 0 HcmV?d00001 diff --git a/images/0087.jpg b/images/0087.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3de99b8987c67f79bc374578eb228e0f810361ca GIT binary patch literal 963 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY5|2F&l=E~oD_TROBcf05B zg~BW0-Sv4D*8f`a|E%`@Cwl)+{D*fN*Vm{1XGppEcln9Wd(PimlzVqG*n&q_zx|1v zne_6}-^oo+;<*d_zI*OXnRW5o_L;xTWuET_XKmGUhvb(oGfA=`=7{e<1$+Avup17dYR?U@5>r3B! z$=-asw!h`n#wi;jc7(6>4C&hY=v%pOsektUy!I_W>SU80KmTXgR3}?I`~2-^^+#UH zm)&{%K3&$gVyj5FTk=eu6wO1LOSx}WZ@YF|XHZmw2gcTZxqe$lCK Rd#7j~x}9D9XY2m|HvuU1h}i%D literal 0 HcmV?d00001 diff --git a/images/DQlogo.gif b/images/DQlogo.gif new file mode 100644 index 0000000000000000000000000000000000000000..540ef5758581872185b7414a6d8e57a94cf6280a GIT binary patch literal 10104 zcma)i`#;l<({+>#)sS6Pr7^Y|Q;O_q*J0p%E&nHg`hqx5V7(!gz^pYOW#G zTq-JssC1=tul0R@{)6xN`8*!y{BX`s=h!*e8k>aO2Qh#g0DwYeGcrzDS~?Snq^_>s zg9jr81ZJzMnu)|2D)ph1l*;JnYnxTe?(y$SDbF|;0}CcZe<`ziC&KQ5bLuO)YOx;Ko2Ao^NVqx3spkcXW1j_guJm>2hx$r~i-$3??!xA_loG zcI_%40*np9kO%}+6paJ~;YaU{EdXLLgdi2hy&^1uK*OJi*$Ij*ia@SRz7>W;p|F9( zHzFYP_wUf3=wE-n&qBqZFeH_m4T2;gaG?N2K?p1fgYA4gp9L14`uirTk2#tn4pWRJ z5npmZD8AUHvLDWh1qOLJ`f;lXEFe*UB_;SA2-btaJ9jv}5Z2mRlVXAp8>6}$E(lr@o-vOx zCPgoEl1I^EYwmzm#xNRNhx7)qgpP!rx@WT@#DR!VUR*dpw}NoZ_=Kw&>;x`MD0$t= zFIDZ?Q8CUnwBSe0`cRM}5^1{h_Cc+V=y*chUg+4t7B%B#kvq>GLn7VL>N4-6&pwdu zFwOhxI<}%94CnM7Wow(}>?l1wpNRR%in+`b=&}*aJe0ek;_K%;OMYFKd6mmwQosr? zWv>9%7^F`yKx2f6y;A1@M|}`TCiss&4la%$u`BYGYSJ2=EM>pW9~qz;yMvT_32=V_ zBvVet!y(k0bd_VsOPQXeG3|s*gd+TfHenRdVHw=0cgu_c6FREz)h0F;YRmMp^#8_n z7KC%Q5CIN5>$MW7X+I}{zr@#e6ivwrd+8dhlBlQk+pE%D4nJOGUUpv+w+N8U@y^`2 zm%eh~c&B^#3D*{7z-QD?{hrvbL{+X+iw*aIe)$xKsXKjKT{_|czM#S_bwjt>x2)9) zVO4ud7)T4Pl4Sy|Gq%g_(<;(DU(!^8SS+-?izzSWOn37q^W$u4GZq<|ua52i8hN&0 zQ-r5=(p z=foivd$z-%afhP(-7Y?9HGu37vsu2u4f=%#_#TyOLy(bfl~uAPGf<5rhz+I0_*V5A zl>O%knOhYjQYa!&JuU_Mb#TcGjFskLi*j!$d(lj3m(+1it_u$n0=+*z~Nx@q$jFv?(m z&RkNqpglzdiT6II853nm!F|bMfXb{gCDbz6{$QG4zyK^WOj{}o?u6GwE~B5 zD5^uUSL+C4J~RQ}54VtFE6ovG&(eHonV)blQM*tJran`v?q^vG7=53- zrK~@URECb|D%IMvwbz~~3iAp5@BCi@V9H93%mDSybTmPn0r;!hDb1PT_7h_PsOnB> z3l!=w^Q3{_arLF1B<-FqhwSQ4(bvha5j$prR=O{^(7GJ7X^H$?7WHdkTuvri`+%^L z%iFNKdDtE7JW$fo05u!Pbj{6V6-E?Um!ZTeq4xmPiDifK>ufFnV-y2YOzn#@uMC~) z?^21WGz`r(G_603ZYDd!9_++1x0^k0ZdO$>y|wMF4gt>%1^yYw_*X*CYdG`3~3@m9x0D9y0Vf!wQYu8tgV{`cqim;02(rq$ggpLHX5`v@4H_fotr+V z#&Ez?>vFqHhmp^h!n38vuDJPRO{pROVDGr@1kChnXcPu%TpGx`SQRuhO5)fKSInQa z=*)?TzQBGnAkt79yhjk7uB}N~Y&fCaQQff@8(d1O;~3vN7IPub^H#fL%~(%|u!Ejy zyr=iR+tN;cXs=4%4WA7h)M@5NGpQk4?t4*W7fS*bU1%-EckhA>N1wA&)>dn{kYoMs;M!0ul$Jazh zzWM3c5dq2syFa$jxotHVH4jp8HEzt1nI$M?aV6VU7=t z*8PRb1#H=CTXpwdKM6)F)};S~t9RtqCl=C=R7O#GHmB0uz+k4Te6d^Qt*maVxP^|u z6HCF4l*;n)AAX~BtiqRm z?wq~cle(DliOa?=TZMV9p1#gGdetI`HdzT$>A9e54!ILK+B+Jvf#DTr@~SB3xD7+{ zHecT5I}Du~uPZfvT>ouE#jF8aZM`G+5Gj>xvk2~a~?)}AICN}XMTJjduCy#3F6#Yjcql1%Qrj6el2 zvlx2#(31<6OYN>;zL&uL(rM>LvxgO6X2clYzTvo3aa1kyb)Cum+k%ae@s!ZHCcTBh z#KYZv?DKv}9+Vmf;J+-mfquw!aekv`W9#zeM~Lk&!J}X^{*(5T1a=GB^0Ds-2@72( zptI6L>=?>)eB=@>WZ@v)SM{FyzQcwWY~B{tnXTW>H= z8$;djImB)g-TS5}T%M8Z9{FNIe32@O-%gWWs_L>F6BwipN)9;sP}fpLN8EW^ce zbVPa4!B+apfYAqXFenW3fh^xdOu8}{FVe4IHkxzh4tQz@2h6)fxdU9C^uL9lGE?cIuow>VY9?B=yJ{XcE)33Z#HKE{(D7+vDos7AdhvZgk zEC9L?4jzRfIzr^9#{o+N_#BC%2L4}BOoY=A3lV0-NB-O)-1V!WsG z2dj`zJoM;#oc5A3-H>b8*@mAPl7>DFH6 z&}RM}N!b*T8U<-}ZBP+aM}_nShIh;+SjYSqauj9BLRtH)Y$_fZ>Q2_B;KNiUcu2ur z>us*>0t0Z@i`nBSO#V31{uy|TwCPWic9pRC8EF=gg^ucvDqcUgQh`tW98=jQ+2!th zY#CRRO)#j!L|Z83h7un&Tw2p=vVPRrkQBJ_iC#6!`O;e z6Y$aF72`%&MUTXU_UsuzFG3YG!cF+a)cUl6KaRp~6p!@V#Y>Hy zf035!;}baQ=@?c79;^zKJl<&Yy+ZavOYYGW6gW&(uJcz*5RHsU-=pcLplbOk1-Azn zI`R4^zu}Mk%;BU4p}xjm*KIpkp{pI|d&p2qO_nZv&3BA!f?QDK7DmQPrg777zPtN| z2f8)NfNMGVTV&){UfZgFz|d6%K3hC|-Bg%r`T-Rbr;I;{KPC;f0JipTvvFAoI(W-wrd?CG-kdJ(By>zKV-_VuQ66GF`q;t_&~~NJ z8$w62sN^e8@_$|H|gs5KP$^{voPO()!H@V9CcEDNK4h33bZKqT=6orLN$~M zYJf^~{sI#Ylrto#L6$0Ur!S@t6f~R}HW+=~bFnbBI74N!K+Fzo7GQNr_p6K@8f*F3 zsMSL}@C(N49DZETMw==RioJSdUnc_4^8M_TtQxQ1eo2Y#-^Ml_#C&M~l{9kt2LicN4gSoP8pWw5lx{>ql*yob9V}K2Namo=bxPb51b&5-x0T+Bv++3 zNvxrjx^B3IUtz(T-u~>Uj{`@1xfrMHIulwdh+}hwm4;ZD$7?k~cdZ{HQGeo6@Bg4i zygK^NfQ%-A;5d*jNg~WCcp}YTc~0O{a=NgPL~dK*pNiX14}&{il88vW(C(x*iU}q* z=x@eoxjSiB^&?;e9T46HbA%@Vclys@yq@l3N2>bHXu*3HPbF~a$mqBGL;BS?C%~$o zJ=QDXXb*9#a~*J8$;P;N)O!|P0z0}TuFRJPwBCgx08MA1%WYtIMN8Kn%kH4Am1|Y_ zv2+>Pp@gUbiPJ?Br=u}zBzMPAU;R9lWood{?*In&fM+r%)Hx_Ryj(Ms(d?x~Qb(b~ z5(TACPHi|Go@EYa^+AeMiaaN7D&P6N&nwy^8`N0Ax^$sN(!Q(Xf`c_md++w~4JD_^ zZ)fEY%*IHb^@x=E6nwDb?gStF@`;q-i6UjBn z6pxbW-`-b@h~I`hUK%1iUREX+-YqC6NcI~h4TJk^_A3fXyoT_+k!M~>t053HT^EFk zTz8A#5p0BmzNFr!klf)3<{)>Nzl@ssyYIF_TrBIlM6EkA#Mf4?vSKJwY6XjMQ?Bih zhldv4{^fLiC$*z1FyL(~-ZD_UweuEKG}Fjh;vc3FgAES!Fp--hDQGZ(c=TD&(GgL$4)kKn5JkIq zlwgAPxRW1jnPV*BA1u>vYyZ>iPd6ue_qL+SgtbSt*vkuQp+Hn)Qi9Rb5NZ6$&&E4L zI?n$gH}+zGqY#uKgRo>=TY$!(IRwT&7g?k()z$s%_j%XkgqhIPEZ?!!{Y{sJbiK9m zqt4|2{f1VI$xXPbDSCw;UH0{GSekt6Ecv8a_?&XzpOT5>ay^p@Gi4?`>_pU|ji6=) z0c3J)_YgK=;fCMaD;66s%HgvM9MPwB=z!n*o^a>xMe2gbRIedBkz~muWU9bYlb?{s zgz^5l%MXR}T^s)dExI^IkS`2}`bLvy$ZT|;j7dP4SMgo&{h^Mx8hRjl;wTrma3W!O z9p3`?-jP9#RhNQxj-=C4{@}RkEr-mO(UYy%SzmE?HH2+IiK@cN>2C+i&>CfV3QjHh z5rp0l%AgIZd#W|(?t#m+6S4e}4tUsrcD>}V(cQ^EPegaoz?DgZTTdmzWHHj%yHZQ9 zq?42lwm*z*`0|tIbXFL;-o57K|B)KjK7YfMdCpo*zWlRz$?{yn77ioGQN8e0Oj~tk zxsK+A4_Yy`yFr>A9Wo?)hH%QGLoh2zS(k~CP4d?6EXQEg#04jR;Cv$Z4)~$Z0x@~t zq8G>FP|DMtKN3-;9ru}`MPVv{@#6>ip}*Dp@T)m_s!!DAvFrTeYt{=ZhIch2C=$JI zHoi5(Yo2sIR}FN|QQawoeZ9!)7>z11{GRh+%qFOd8n&Nj8Zq%BPpng6=Hl?M7V)0Y^(5{d%PeR7Vcbo3*=H;}2HG z1jmnOT~1xLMgeaQg9i?2V~tUkNB_MXXwn2}n1d3*?TW_g-7j%1+KUs;^tE>WXqL3dAMCDsq;R&W zhy@V3n=pMwV^mj4FZwfaR!3})?r~+K9zcmnm)7&vJTDLmNCIo0nKZD$>a%Wj5-!WM zAxv`b-D}sGAv?X1;^dUX7#qBU1kAWSi^6f!vo+IA!33}%C0Hr-o`G!;D3cVnFsQv% zBKY(dDPqW_uor!F96OyK<@iD|K0|~rO}u<2%3Dz1zI!hlB6w0TGO)~NUkQ{anOb91 z-afW;!Sh@gX{`o~((&?|n_cr479wN+;t9lZR*%;%T1RY(%MuzZ;Q6eJY7kxFQh{a! zwd1AQ5(IiigR#8s3As z3&bDb>gHOA!oq}s2*lBBtdP{YBQl1fM5pp*L6MD(BA=XP{slWh2A-W^#x8 z)nGj!Wwm|GD#cn6pp;M5$3=?-5I6Dz{1g1~lE|xh!YIF4y%{L0yoU=V^mNctQvT>a zFLhcU7tG{F;)7Za%J5#NNbRCP(!!=ZWdaRJruar^AM24rXBs(5fq*hE?>|4*?#ivL zY(yq&pW2YtYrbYQW&z3cT%&pMS0Vz!PHIqJoHor|WU92=4EcgoT`_s)R-C%CCA>%? zM$RhzTOPQ2G(*)9L>Q)6##3Kf6EZ7gk*dDaMq1`CvJQNbMTF{BDSi1HDU@ATXnQcx z8mgQlrYF0`^|$4?zXc|^$Hz0s`YF#1yDSngTw5e^^x#*sM|l%}>tc&Q!wT!JMzgFV z{m6i6gZ5byi((I&bN%9Dun_jE9NFYM>myBk6AuD^W-j((0fq0s7d7m&bLr#`am`pYHtRpuQiqRVWt5oPB8NPQ*kDYMZ)g8cZP@`Tv| zL9i3;!h{Oy;|7z#7u;F6r)9lU&W?&I^REKHTJL#owLLi$%YfLMw!YbATyE^=j=+OY ziw<}QXBJLSfxDqSWWbdQ@E$Fzx!~-uh1Yo3ti`T!S2ILXC8&z=!s7~Mt=hKCapm@& zM?)#6&&lpSZEb5)uyyalk8f-x4a-D;8TMPOHOUe0)nMHma4OQ#=;z)?3)#9;&Y$CN z3o-F3t6_pDa<63iV>cptWkxt+ptYHzM!ZY8Tq6A8cq0O8NV! zn~+rgD?M^pXv=5zew>Ty0cFZ;Vt1{~M<|z8e_+NkC2|D;x#lp4cpq zMybb0zQaqfYS@K#JL8DBBj3Dt%)WXdH>~sHivq zqcD@~Q#o043`jh~^QLlbA%z1;@^RxE-NW{8JK;Eo zbcgf7%cx)~8z2nSMtn(L)LN=m_&0hNtf@@0^D0eW`&l^NK)QQ%CtHbry-mwrz)G7VR-c!TI3KiWmP{WuYQKJOw@WT}1}i5qbL;ml=^igsM5@^+GS z-F!Gqow^9&YO=6I_WSY^F0hkV`v@x20Vj=6 z?bS{)^7)Io55o(M&2J0;RX@9p5CaMBO%k5sQ)p0tZZFtP?uuCjgI>Zr&BH>~rm|Umq6aP*4{hUm& zFO$!S7TGoa*!?=vswaeT7H77;q_M&WX@1LtBKz2{8h(kK(;CRS_k&BbnMJhA+!0h> z)GnQxhLh%WUmZ<)pLTGYdKuO4WcUUsy6y+b(sIw;SOo#q=L?b!zKVBMx|V&oOtdCO z*h%{wG~Kd8`+D=G#J8G_>(3p24-!d6S@v-GTTaomXXGC1Gk(@6lQt;bThnec_qZtJR@H6CZ+#arRmYxlF~(JJ(`++70Behm09#5CrbqLaoPV zLN5e29YuIQY0~-`Qrfxibp(s=p7FcbF7$Sikvq6czVU`pRcxoS(xPX6jMfn?u>1o>Ff^LBikGa&Xz+`p__%) zLD?zJ;LY`ww`9;UyZ~rg(edg%OimsAx*z*P)BQ>2UHIg)V=UnxV`{K~>+eBrbvck7 zYCvN#`liIV`OU>Wiw*+#uXD;glzksq=yz z&ub{v2#nR7~> z3BiV!X_=YwiY0*5qkECwLOLY&%t)BTw6*6pgxoFTz0@L=2^I}?@r|-x+y#qmA3Q(7 zO0j2FLh}vm1qh~o4Ijo1n3S@OH()>Rm2nnkFtsJZ=dLH?&dZEK>%{BXln|59*H8gDGs!UBi$PcU#D&fjGmGV_JGrIJFQ8(*2yDs!!6n2 zX2iC&O6B%7yqvh=N$X-pd-22P?(HQJ7Ox^Y<-hz1k1n6?nR`%*15RVT9U1^g2Tequ zMzEi|o-7jihmh8z2w^_bXGi3OKJQ;~tKxRj#AfvAT$d(l~)`0 zBLCi4z~&uUbiQ}tL%l&tWNh%CQK82y2}sEu+Z+&DMO1qKvoD2yqFmR3xlPjsZ-&+D z6L0FxW&_f$QnMPd-?pf_l7gi}ZHB}iKGg;Nt(}%e-R&OD=+s!(vNBuC7fy&g{hV3g zocGqiR>YA2SqN+rxs!B3P^P;Yz&Y8(KLuhR7C+}&o5G=M-2q4fn8F7rlR$pFD>ZfU zMBxkUpL@y60Ry?XfCQmZbD|ur`mqW4uL_X)S@P<{+2Kt)QMj;P`g85~R+7wd=-M(I zYUlk-V)jaeVXS>5k9u<5+TUOOc!{0naVNJa$Nh@>^{`yOnfm_#F$l3Fb#dCIih%> z&5WB~aIX;7-t;R@Tb~Jok2&p6D9&ZMAjdl3R@9(b=S%tjc+?pZ_tx`xW3#ALV-Q!w zMeUg*dqU=(hp@q!EXyxp@( zF-~-4!lMVPlQ7&R;k`?X*M%584+}`#rSACCav$cOKbimR)#RLza5Hb`-Wd%FprP{N zNCUMXL1-nsIwrt; ztDRsMXXCJ7DiLXWvD0Uga{od}|B{~A!+Gbr@1gr-y>#ABX&(qZJkm6?_sH#=>0$o$rqS>Gq#q%Efpu&(pT|QZti+Vj zy9)ciYUU){AHK@y`;>I}YrM|CZ+-vxeg9fnDEh)j;egA#*3F;Q038ybPN{NhC>qj4~`>Ne9VM&&>>z8yRV|@ED2gy<~ z{Zfa?(ntHHPm^Wx`(@6OWo!Foo5^xr{c?R|`Qd)~+hpvWe(VFX!sC907i7iP{feK+ zO5gjH{*iG)12}PAyz~HGNtd8DK+wVJDjN+bTj~<+28eFDD!v0M2X$3r22>9ZkpK6z HJMjMiYzGJN literal 0 HcmV?d00001 diff --git a/images/FFdown.gif b/images/FFdown.gif new file mode 100644 index 0000000000000000000000000000000000000000..dac2d485779e7b23f152829b929107ac4f79b661 GIT binary patch literal 900 zcmX9-J&RCR5Iw62YhjThA)+D^tBnLKg0PE)2a#1l1ly3nNMd8-qGDxn@B?fY1+|ee z79k-;nn21C(pcmNSo$kMs>!){i^t=>ne#RCE?(Z<-no7hNAWK{9s&Xe0R$03417m| z0tX2skwVTY6d^%_0*WZ11`RaPLJ!7Z#0WECNHCzlL?D6@ikL7D8B}m05y?nJPRRTW zDKt@tVw9pL8qtha^n{fTV-#Z=SfvG-&ooAKv%mR@>xdjCm}H7Mls)-c)Ud!JORQmo zO}5xWyEnjyGimGYh7yy33}z@}(s>w?N=_y+nW@Z4IVV#oHCf1Fma--r+00hw=w%!GM7--!8As6gX?^ybw&jhRZ@)_YO19kc}h0w+L`i*?9zpp z3RJK{6;qy@t-G63iAq+ga!M#U5~EHPs#v9}sYW%cRXyd&J3RBxw8!q`OpfV52Rqa; z?Okx3R>bKey4kJnX>XGUVox(`mB3{PYni+^UJ-A=+Angs zHnv2p15cGcU5 zo13S;fAYucw~s&D*uHyY|HFkxU!1;q|I*%@-Nz@+-8+2w+R1lMw~jry@^b&i-_H(y z_w(<6-9Gux^Dl3m|NPfGKfQZ(X6L}4FZQ;sz25!ww<|aIzrOm**&omU@c!Gt+5Z8{ C>4A^{ literal 0 HcmV?d00001 diff --git a/images/FFleft.gif b/images/FFleft.gif new file mode 100644 index 0000000000000000000000000000000000000000..a699e80dd35bd71e6d5309d61522db07681bd523 GIT binary patch literal 898 zcmX9-J&RUn5IqYaz7V$xf-Dk7li){WQ9>jk5DqBH5>fmEacl&;Wo=TVIHXX7Kp==o zVKJ6#YrDm08-oAA{DU+h)#N<*6qn0$XU^Bmy|H)w>u>JuUWEYS2IvE%aavMvO2Mh6Do&Oavkrp@<3dkU<3}5|NBl)&W+`j3k{8csqnq98p7u6*Aoet~Rta2&u$IYt;}!7+to%V;R)epzdADr3y?W5a|ZXW*g+3RP! y$KE{Odv*V>->-b}?&$E+**~9sdhg)rlY?{m(4c@KN~l2tO|;O1F&HtzOc)XjC@>L-V1yzj%tHnhoJd46Qjrrf zKSK&l6rvcVsEI~2qZK`2rNbD-mzT!F}hY2Q`Vh&|bz7{nsu*ec? z*kF?__R#JPFyc(wy1SvoWFUhX%9wN>hNO~{iA-iHb5hR9R7y=2vY4f;$woG_l|AW1 zEozkGjIb1~K5abxsQ{E}5Dxbg@fa(~WL+t9#np5Xns_q)_@*WZ1(0iT=evHl5cCN?%dz5jb? z5Oi?9EC{OIiD z%OB64?;Xd3lXE{k{BGy?<^IuEzx?^}tv_DBI@ahT>ACql`Y(U57LK# Ang9R* literal 0 HcmV?d00001 diff --git a/images/FFup.gif b/images/FFup.gif new file mode 100644 index 0000000000000000000000000000000000000000..70476111a13a85d44b869734694eac2e6ce75cc5 GIT binary patch literal 900 zcmX9-&#O>n5Iqkx-o}k?M2toe43j7-P=q)nyr+*Ag1c7ZqKzB%tpp*Cil8XiO04loL@6{`~23a)0Yn65dOpaLqNbFfFMGMf$vCA z;2?n{Qpj0_A|z-~KoKR>pn)b@=)o9_7-1$12?i9H2t+VK5fkPig9=V0A{nX337MZE zg(eD7j8fD@Bbw2Qp0LtkjABd!tF$2VnZ}52_BUT~9g)KXlT0y(vL|1Q8Wvb&i8XAn z$rgKP_XZeoCT-o_P+~HW!3}h7L61WUuEtB`gE8-1U`$aC7 zTto6a9KDlWOD8VtTITK3maN!9t;zI8H>mqv>bE2R@7aLQ$@N(O1U4^WWApI23x8>2 z?|~EFUcdVM?45ld?RWeqG4}S99$;Y4ny>;uuuYP#>_}a1Gemr{o#jmG!Uv1z2 z^x`)U?(H7=)CWuumBG?QFiC@~Z7HezaGYq5%Xkn4oVq<&&wN9}? z#4qoV_Xt+w9CC`w<=ox*+r2+s{&??)$A4Y>0{`LvLqLF0KoKRBkvkF;Xf)773++=V zLV}C|h8SUt1(sN04F`;{U{@f)f(oue6{}R`3J+OS(bcGCwW?hTKT9gP1~sfvjcZZM zTGhIu)GVtU8boCTg)cNgOmn{Fisy(l8*H-0HWg2~7G(}N6v9)O;*_R5nOm%NXPL4$S&?kO*)Q_A|Md|6aZQ^W%$p@a*R0yVw8x{@pK6zq-Kv&%W<+eEELPG4NhcB^&46G&EtA$_gPl(?U=h&5BCW;xQ>F6D6Kn_) zeTTe9uyHbnoZ@mhcX$4F?~e~3-248QYxshH@&6$pz$l=I63WOO2?{hCXrhJoDHI_= z#sEW%FvbE)tgwayMp&>bkYGUtSD}hks&a*gEUM^gRI^&uE`^^Zm0W`w)~Lp{sAa8c zT~TV5RSpfJGJ?Vvnjoe*-*UxsM4AmY*jlG zccF`2>T)NKKvGS2qnq98b}KoBN-g)Ghdt_XFM8RlUUw3WD65@}a1@N z_6Vay5>(G%hBKP+EM_^YSx+XP@WO9z#-8Lt4sT(LTiWtw7ZPU_(c9SOwzj>(ibtlr zgB|W@$Gh0&u6DiIrVJ#W?6XSXF@&>B*_*6LHsI_Rd0g@gDf3A5N%kzAc&zJ~kIz_& z;s}kV&<8!B=}&3iZhgLnbG|!|^H1R7F21_BdHH_+e0FjD_T!K5U;p*%*WWyPb$RvX l!;2etp8oUk>h0ez>;Chb5C3@g>9=ox{{8W%pPmpu{09xlbw~gJ literal 0 HcmV?d00001 diff --git a/images/cam0.gif b/images/cam0.gif new file mode 100644 index 0000000000000000000000000000000000000000..5750f40f2bbf76fe4f22c200f3822a43932d971c GIT binary patch literal 952 zcmX9-JBXcS5Iu`4+(wKDN{ECB34w@JK!}Eg)A$NDVu}SVMj?e-3l=F3SmjZ=3DFIV zf{mgkHi8J5fW?YYe3d>}45mq?h1xhdKYqpKGI!>@X6{qZJbCP~mkuNFH~xPF1dJ;P zB7_*YMuGwd2_%t1&eAACf(8W?Q9=zGXrhH4jKPQzX2OtQK!J%s1S1qNVIDH5;6x&l zk&2v<`597Zq7cO>MNKrK8Lj9ED;>rt#x$@>3o@T+jObzi<`S1Da+qL}Ddtf2B!v>pdv4?hVfDvcX);$d+CIcDFP{yS5FeH_nOk^@snUiu(rc!FMki{%zO*XQb zt?WrBYEh#cXM{!35~%&aaoD+y+0P<#5$Zme#)uwppG#WasGy=ss!>BtwbUbT$wu8f zQ(lo>x)D=>3Rb9M%6qeQPjf0!$x2mD2_;8j)Tu%ht5h}BsAjdQr@VQGXa1S?+MS%q zF&*e&hdQQx3y#x@IGyNZr#h#F78jYCE_AU=UDJ(jcB^~Z*W`uR)68;8;9>~NG5KzM zBEEp-zR1NTmnC^0j^4>GM<*`UwV1b0Te4ycwIc zZr%Fn^1gQtZ||IZ`I~dkUfX~AgRN7WSMUDny^SMRU;FaI&5zzb{rIQ1H_yIt5ZKmY&$ literal 0 HcmV?d00001 diff --git a/images/cam1.gif b/images/cam1.gif new file mode 100644 index 0000000000000000000000000000000000000000..3d0d35109719dcb0c996939459e79b46f767e347 GIT binary patch literal 967 zcmX9-Ply(D5Pd5_TZfDmj6iBiFRe=++Ne!}5k*t>5aLQm)QAasD2Sjs#e>8QK_Wvi z_Auc_hXvh*C@;a3hzddwc+pef$u5CV3d#6>_&a=j%s2D?&3rp|?RahOz)LXvhlkGr z0<8+nVT3hQbB7b&2p}9mM2|)~NU)JWI+Dmn0p%#78Z9tK6Wu0AxPgW?gPEJrtW7-b z<}_~$Shxi(+9-ZE(%6=;bW2*c6|CHfR&7$+ZcS^^Kq@6je4-JehV`3DJ|5lM10L={ zk9NwF%5=6TJl&I??FBFQqF1}z3!v%UA?un3109Ai4`Wz|@(`pmydx0d5sc`dauOAT z9f?SfWMoGn%A*+7p+qIB8Lf;k6pcXT2Z}?^WlVmC%pp{L5RDKupgxs2UNgaTCYj9w z%UNVKwIvxr8 zyuuTIcWLcPPUPq^lzAD;x^xSQQ;NJRP~jD<=pu?fWU?z!>6NVPDpYwDtGaYeT8KP# zk5hsVLm0=TyU~g00>*v050^fcqcL|Z6WHYHi{ZkIG#&x@p#OeIlr0r?e=fJ`ue+#FucY8k3aye z3XHITHB=+P02>ZC;Q{Z_7(@i3kw6j|$VLH0RG=CyFrow9CP>f_hBkv4&BClrJfty< zZ4Psqhk09wpB7=!mawE{Shf|cXcbm%Qrff*YtcX|B}jat5u%3mn@Sun$fko%deEC8 zPbvqanP8F`%w~Z_RO*@Ro}jNw`c-- z>&M6VPhj#lOiZrWb~$gHocwg%{)Nkb-u!9l${jP?uKacDm&HpCKU%nQ_Rg=9TRvI% z_tNa$>9u>_e}3W^cbr*tU~cB!?%BVmzg+TU_U_d+_hvr&{>`dqdsgql))UJ%{5QSo z!MRPRr+)l+@4AQQr!E}2K6m`c-gEnoPQCc~_2GYh|LoS>!{skm-kv}9^xhvk=Py3K T_QR{^kMGZ4I(TYg0-HYouzaMQ literal 0 HcmV?d00001 diff --git a/images/disco0.gif b/images/disco0.gif new file mode 100644 index 0000000000000000000000000000000000000000..5aa893892683615b9bebb9fbc08e59ba0f0fb62d GIT binary patch literal 936 zcmX9-PpBqx6g@PH*OZ#sGBfTQ-ojupi}9z~98=6ANeZ)=bZ0lFELeylXA(`5nubs> zaZBnYQer_CH&dhZSXx<$lAV>TuJg-p@%44Td(Xdnztaytbl<(_4k7Rl{(l4nj4KEt zgc!I+f&vE#B#}bSY7`+sg93^up#}{!(LxW#V8jSBVMs8bz(gQ|5sH{F4;fT&A`!_* zMNY{43@J2Gh+>qYCK}OM=_g(_C5YN}DqYE@5p^A6AaGwroIIg?{L z(7_IMO#2obrxkHJ(aBDAP75tAnVK$iu}fXkjc#_Ud)n9Jh1k=~Iwf!!!a643jZefE zuk2yN*s=*0s#rr!85rg<6y8jc!oSyVc(||J{f6?phz~KY@)maKpx- z?Z@-G*ZF;?PNJB1{a>1NI)qJ~*$G8v19Vj2ngSg2VXb+fUNe_)=>WOS9T#nd#K zoMuWyiSCBgF$jgSm=gbiY?R3Acz*dU-rml8&hvH7d;G-XM<0A?6M=v5|05t^TtN^a z#K1KY6gWsAi4<~HqX-Ea6i`G7HE5uT7J4uSBSx4BLxKSXCIS(RP{f3J$e@A~iAY8& zazf^3NTG>B6r&V1(THZWq9?3$7^4`|z$z`se5Ns?hy9yNTux~L3s-zk<)Kp77@|JAWy))$% z*`*sX6{ui^DyFDS^un)-m~Rd?LPp zbzkIi$+aZ!!_hn0b#&sgu4UdnZOMu))S66hbc1@{t^T(4@3mO((E3>a32eN9Yc@9T z*}eGX>5c1eI{Dp=ymI!B15ccM^VLg_?d&`J)S2_o-1*4cw;Xi3WD-HV?u-T&54*X{iE!M7KW9eMQJ z{=Mxd-@Enl4d3j%^UBpv?)dQUy_6W9mXieG_XnwGM{OT=wbin64w(sOfbn5b0~XqS=6w= zB1^1cgH5*BL%TP?h%;&Ho`w>WfedCSW72sTl1fe{GMTB&NjWD|DK%NhVwSQd8`;cO z_M{WFs8NnH!cw#XwI4VRJGU|WSu&SU_rWwq^nm+Z(t4wUiYlo_4K>wLkGv%tb?;1h zMRw^%Oa&@fp^7Q*&DK55sYE3!RXHV;9Enk<3RSF9)l{RJ)vBKI<{h5-XWDCbawf-g zpo1OinD#9=PAlScqLZEKoEBPKGBsW3Vwbw68{OZ=bEJ=l2~x^ZV|_&7UqDzUQe^uU@?4#D&|pj_hrG zv-R`k+wS_|_4f|;-p;X?uI*j<@XsGVIr`>}-@SJ3#V0>|^sOT&cRu**iI2B#zVFh5 z$9I4I=((?+dE=IQ&piC~^H+DS??3qEv*%y<<&~Ge`0dW^Pd7jR{@cHg2Ojzl*x!`& literal 0 HcmV?d00001 diff --git a/images/disco3.gif b/images/disco3.gif new file mode 100644 index 0000000000000000000000000000000000000000..bf6fe42241a862074ef5c05af50b464edf0f041e GIT binary patch literal 937 zcmX9-&8sGI6n;d_ok9|7bmLqiYM8|&lbOXsF^zrHKLP^A6$BAN z3|u2YfrA8+NFir6ijbf|0Y#Khg9e&tp$B6yVuYD6Bp6U&A`rm{MNF873@SL0h-9Q9 zCuDwx6q+bRF-lPrjc7(IdcsPFF^Vw_tkQzaXBs1V*uS~N^+XO6OftnB%AQ;nH7u~m z5^LCClP&hp?hP>FOxn7qp~Pe$gBi-0bRLGJl9P!{W-4=1&dF3tO%}44rL4(DHnWvI z=|nARl;e!B6s}h7561WUu9h2|IC*liO z_eCz3Tubsk9KDlWM<*`pTITK3maN!9t;zI8H>l^`>Tg^BUWfG#u8;Mfz{VT6W@Gcd zQ~K)6#tk>0{Qf3hId|>tPo8}9)TPIF_8ofq?1g9Ve)R2I552y5;Ipk0yLTSG_`(mn zm%rJ4;H5{7?f>(hpU&N}@5+x~Jh%1CyGLI8eWy0`snYy-_9TW_2XB*K7IA#i}(Ki`SZs=*#7dCZQ|&E7ax`v literal 0 HcmV?d00001 diff --git a/images/disco4.gif b/images/disco4.gif new file mode 100644 index 0000000000000000000000000000000000000000..cdd79c85c22db696e13e4b0b669c6c479bc81c0f GIT binary patch literal 936 zcmX9-JBuA;5IstYB_JfNCUG{pg;5KO_`v2UBw0m71Rq6^Nv8n|Ekq&W5lN6Bge0i2 zhz^Lbh$4uBS`7viWVN)i5Fa4^0kIm-hhK5I%$+%}nS1J?llR_p<`4q^;QvQJz_@}S zLWqHDBq(r@KoTkBtVR(MG$^2m5^B&u6D{;$3`UGF6NUr>3QPnd7@>#>^N>LWClZm2 zROE!r&yYeBg(yZTYN8R%Xhlz0=`cnyrh!#jkoinwL=XEnm$;tDVS-7fm_yl<%c6z_ z7Fl8q8*H-09@@PDMx04o_cWB43}i4v8I#V#kW_Lqk;zPDPRco%N~y_07PFK!*~n(L zvL~IWMU8Tt5tgDAsQtik*tw0_&yu->x(}u?q6ggPlGYm)R8&bdYN)A}dgLwHsC#G1 zE3!*BVk%I<3RO&bZ?^7fP9-W?smdv#s-_y%tXB1uH}CMwKhs{jlQTJ{ z10C#8$Fy(3aas|l6P@f-=d{q`lBwxJ7rWFo-RNewx~F|jUWh%-tWyG)A*^Ha-S|X& z0qefV<&tYj-iM=ivg_!?WnIg>ecF;0Tc|ae-slGPyj%Tk^WS|~?~e7c{u9_ZkLxxL zZ9n$wS8x2j|Jdo>17{w*aNwq+Z*9L&*DmfmeD;^!%bVX{I(+A&r(eE&>#0k(Y#rI# z_PWd;jQb*MIrSi_bpt;fdFeJh5}-uZQ2;y5a7( z?>oNx)4NZ7`uM9i-gWkY&z`=v^T+;!pFDZ-nIB(z{^Or-+x}qlqi??W`*`5~{{Uky BmJ9#@ literal 0 HcmV?d00001 diff --git a/images/disco5.gif b/images/disco5.gif new file mode 100644 index 0000000000000000000000000000000000000000..b82f2b9ff49a9923f7ece80640bb14b45932dfce GIT binary patch literal 937 zcmX9-&8sGI6n>PNJ7pxH=*GE3)G!OlWM=VDOd}y53pI&e(=Rj1pdMQkAQ%21wn)m z1J_7U;2?n{Qpj12A|z-~KoKR>pn)b@=)o9_7-1$12?i9H2t+VK5fkPig9=V0A{nX3 z37MZEg(eD7j8fD@Bbw2Qp0LtkjABd!tF$2VnZ}47_HQn6J(0r%lT0y(vL}~C4GS!? z#2Pl(WQ#qtdjpI(leX?@C@~qxV1_a#orfW*(RI*Z)Q$op+7M3vD;hBG?y>=&Oa!dz0 z*rAST--6?`B2Fhd*{RNHp~WRr(}gZ}scX8?&2Dv1`5iTDE6 zeUZy0*OI&sNAG0U(TU5tmU;WMB`da2Ycjpj4eEKf`rFpOS7W_{>tp>VuyGn!ZEW6s z@|`bV-#BpniSMrCWxz4-a!eP@5VX6LUDzJ2$|1CN~B zzqkFwdpBLW_M4rzUcU0l?H~TV_v^WXzkKx4SFc>T@cdoBefI3J_qV^eVVgMeAB>lm A6951J literal 0 HcmV?d00001 diff --git a/images/fan0.gif b/images/fan0.gif new file mode 100644 index 0000000000000000000000000000000000000000..0e3f486750719dcee360628bb15f69a6f0a84a7b GIT binary patch literal 1135 zcmX9-Z)lfw5Wi%Ffv8Bs@nhCa5Q8m7()5S+=a^v`4QYrgF?O@G7nZ`9sVM7UMgO-7 zGo7ZlNC=rBk)URFl5LWigWhaSm^x7!j0nT!o3778-xm)L-{wlWD# z(f>z?j3|kTScr`{@s&hKj3h~kR7j09i$W7JBTI537jh#{3Zf7Sqex1C38hgc1CoTv zn39>8h1r;s!6U+AEXhi&!fLF^27X~Pwqz%EVK?^VAP(U$j$|lJ;WSRr5L7}C_&@_h zG~*ktq&Oy$q9iJ!CYoaKgliK^aS|7C6Hf_}5DAk=fqMX?Nv6U&y2+GMnUqD@lv9xh zAjMQtl~hI5R8tK(fy&fUozz9$)Kh~rM8h;vktjr^X(A&k6cvHO4B8c>HTD^8k|xtN=IT9AcUm_-_<1f!_Ubc_ftQAp`b&f;v&>6ja=qg&FIT*cK~ z(~aB^2~g9W+{NA8(}O(3!#vV4d4vc4%)r=@9LOnyDOiFnI0L(YIH5=~ltLxcLNkoQ zq>yPDPT>-6;Tb^@5@8V;*d`1Fo-&J7A}I_}u}s(-tOz!s*e{X7r4&QLJP=Mu{{&4>x@&s%)5rX5*R=7UmY+Y?_v70Y zm5m)`jdSnLsh{8f)n9D`-7{+6`?l(nFVFVytnTa2&#C!&_w1J5>hp`PHtwCfq11ox zl?A^ZTDWD}ytP9MpQA?`N(*}bzSg|AY3tHmy^AKE>1ph_aeC=TN7j70?zPUxCbrfM z^lxn2)3mJeq0#P5W2ZW5w~haDqJ77;$>H5PcCh2SdpiGVxzc)M=h5zSrPX~e4ZitG zY37BYo8uR{2G-YK%hc~zEU(s~y_;17CypXjY ztZpA2I54^R`n>zfH~O02@0$7H<=Z#kIXp6PvF_Bwixc}s)=ZuLe)G1IV@KUMjzGP(krH3mY hc(wJ;V3o~o-oF2>x$7TneZ91J`0BdlcURD|{{ZFj1DF5+ literal 0 HcmV?d00001 diff --git a/images/fan1.gif b/images/fan1.gif new file mode 100644 index 0000000000000000000000000000000000000000..cba28fb8da85664a5e2f4e35b25c8d1593fefd43 GIT binary patch literal 1161 zcmX9-eQ1|;5Wj{4N6oEp#lqr@H0_;;xzOgR%;rD-k+0a2D`Q$BIji-Xjyzd2ZOx!? zGIe!AKhz*~&4_-e+@?b%5nATUkcOL4*^5!x4;SOQFMa=bc=$edpSQc`nR#<7r@c@K z1bO)X5P$$UAOI4e0D61{A|L^BU;rjy0rpfV1R@{~3ZMikpbiFL1SVh(9$*A6;En+a zgdhlx2#ACzh>pQSgd|9g49J8m$c_^Hgd!-83aErCsE!6`geGW?q0|Xo(1Qj-We5ts zpb5lij&E^A=?IY%12GW`v6F#Fa326J55ThaL;!4tSQ4l3j5p^*TBQX(ki7AEAsCCyEQMimka79ogMNxE(xrO!U zCRYY!QWj-b0hNd(P+b*NNmW!`4b(_Y)Ldio5nk}STZ}!D3vzHnFeF1Ubc@WL=W^@EMjuaR?1fK_BP=8vRikZxe5hfpi{DkMvK#SchB2PN+GgJHa^if3&epSj})YcE-Jptk6* z;ogqQ)sv5G?f!9AM^$q{@xW_SzUi3z{?7ZiKEA(y#{;|mYQk=HHRFue%;P-??dY zWX5ebRu3I1Der#ra#{V-zHyTdW}EU)Tu?EJAuHvIAX-d9&%c(iTd--Bniw;r54qkZa}p#w9goog)3)#qwEm%Q<7`G%Tn zAAYs5?w;c5xi>GunG1!#{WG$@|MZI7#-}?!Z`ge8=b2v)F8*cRXlwQMvbU}mRzJV? zo?szshN`5Czick`s`2Ivb=c9m4>^ks%tY{mu_6C>%2W%o|(Aw)Zmu(H8t9L PSMNoAZ|d3cr7-EAR=L$Qn94d@b8M1ZFF!%6d4M9dFhz$yUFEsTbhN^#BrUpd>OzAO zWi>KSQH%9PYqLhH&NAZ<$>HmmZCbXnLJX%cEO*_rzJEM>_I>U?Z+Fk^`^$<7mlgrR zF#LZAKmZ&N00~e4J-z}FkN`O_028nPdr~L_A|MV5pad$Q4hCQZCSVR8U<5AUjsXdT zAP9~Kh=eGJj=@8OBuI`7$b>A&juQNYA}EdusDvu0js|FiCTNbK)CpbCg9bun2nxQS z3B+iQZ*fJ*5h5oBVj>n|Ckan+EhJ6~q(myDP6lK|CS*?GJ^)Ny6mJz)Z}->@1N}Pzj5(0xPi!tFr+cu?d@VBpRYz*drrI6eWR%ABZ@@c^C^n ziOfW3)Irb$Vl+fuTuE|V6hui>L|qKTNKC|BVoG5&YTY$P6fUC>ToDvWQ50QcZecyT z$(2EwlttN9KqVpxR96L6QWaHK12s|;HP@JYgctno7Gsa(f*jls49QRo-C`Fa&QL^d z48~+E#%=;8l*kk}1yeE=Q#S)MG7~em*rpgrcydox2`DiH$uh;>#EQfQB>P2_xTIuA zF^`Bol1-LQD6uYy`S2N*LU9NUO+g>%0UG^L8gF?c8IYWUE86=+xBhES~_M+ z-{IZ#_N|$}ZtCvcbEqNp>d?Q_?#O>==eXC$Ea-kNzp{1Cx~VTW)~-0ZC*9ulVOK97 z@5r3@?6!{iPxO6U`OSf`Yc3S@wXgWBYV2Rfe>wKa11EMqxH|j%k@dxczg?M-?);%^ z*}2uJ{+j-Z{Ts9Y*;wLF)9^A3f4? zv~khUpC|WLAG&$s`BO7`*Sho`JoAlI$S9;cDwtZQ%{NzCD^BLQx57%ApuUP-ykK^yF8>qRoa7kHj z$A-oAwZ%iNPgi}lDm{B}{N{$dYF%T265IaeDifbWpQXnN#A$2k!BQha#3ikovLhc;aqZ@?58G(@) zh0!_k2uKnpX9i|s7G`IOoPtVNoE2D!Ral)3*oaNooFmZ?<-#5rL82%LH2grs5zfO{ z_(^0YLZc3XCJ>_`>f%b0IAVy*$<`Pp1qfzUwF`{r8h2V;yNQ$E98gmQl z(M_%l%A_pHt^z6%NuatasFJFvx*DjFny9(PFSs~-465iEKEI}clw=qxdYdWn({_k^GgdV z_fGRuZx?1xeX{<*)KK^Rnd$9kUgaMq{$c-!k^amd`h4G(0yrbgFd6 zR88?64_EDeDZ4EH;!M-`CpT}Nf4uwZvf7cJG@MCY9h@BPUw$P2@a$g~##*X|3dXk; zymIcdhL3NZ`}^LDAJ%N2Ys@Jb_-Eq9oljmWU6pG3d1TGew{Dait8F__ekJE@*NW;7 zHvRkBp7HDBC(17Wa{j&Y!^KPM#xC`KnYrWFYxT3Y9h%6$d%@hF@Ba4YaL@LJnwkBL zH=p=6w`KZx=0t06dt22T^9SziX~}-H>xEtCI=`uI{(8Lbk6k&nMb)Y1vxWD){J`pM zeU;u{*ST-ecUcD;R<^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Yuqec!9r-=(U9^_Ou4*DRPRCJL`OvU7(>PL{* zz&<0+V@+iF4DK<6ziu(`Ff#%pk6Dnxp5f!EL#yxK-2dhJe+JqA46iRM?){V$^67Km z@6~UMcY2Fk6`m2_;OTY#@$T;>Tgog~{$BYh`v?E!`lst3{>}QEwxm99n)|sk$vx?R zzAXRGkoKS9a{Qn2{|xJ6Z~CcAx^qfZWXWCPJay?=;I3y?H(%{bxzZD}?(U3wghHRT z?^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Yuqec!9r-=(U9^_Ou4*DRPRCJL`OvU7(>PL{* zz&<0+V@+iF4DK<6ziu(`Ff#%pk6Dnxp5Y_^n}@fYf7X9}WwG97#-Yl}<26_2-;)1w z;$QvWtUhgfD}#S&#aLo+*(YslohS15$azqR$5v!(RHSQEa0cSHK_Db-F(Ju!=cD$__E+2YJNN!`@AsVNcc1r# z9k2)31_f*m02mAa81w_M3-|#X*4*42i$gaY4mSrs*8-0g!P?q#E|FkoM{|3jA6aGpsr4(!$cp8of|s3(PQBtQqPb1wd~nqvyb!h_iEE zxp5AOu@CPOO43LiYId-lBXh4>#Yo0{LWy={N@zC+g8+o$Ls7*q~@7#^RPoSN2t z)ahqtxiA3x2@Bmnf&CvB5#=&NV=>3ia$(Fk=)w}san38}*llFs_eGOjR;5~yH)RzH zo?0&U3f0(0o|Ib6clGXFGCqs;3)yc2OZ!7){|5UHS0|W@#h~F~iGU7t%^B`Lm^HkD z;M@m|TaVC~6=Kaj0l_f{UNVuTlv;U64pNHv?oXCY9xyx*%VV;5-;az+bbI+`Dc%q? z9n}c66fMn|ChFUl7^6(+9uX-zy}NkJJRcW~DHiwuh3~?Yj)wI=(W~jbtE(V5+aj50 zXfkvx_iYiTKrp>+k>UQ0)5jEL6%y@r9Yy2zjIZHA@FENXD}{=67=payv2v}dfobyg z-P_u&@$@oXM@8c~+O3~Nb(bKpyviR)&Ou!3O44O<>TcxrjbBxZ`=V5r6py(EI%0d5 zuJcRc(Nx^WX%MKsu0W3lLP}Tr(e&S zl73{jYQ=JW4{B4XE9nWj$kL>9pV?PHa0CK&@*@>@DChZrp3jycH58u?lh^k#of$xX zefE7H=W7q>C=gheB6bAb9qv7mprI9l6%bVG<(zy7f=MSfR3?q7E+-wF%_8jp1g#q( zco2pBybUjoW%z?wCvQ!+aWTI`^g(n4dHd$Gx1#oA6ZJoLyM+}T9}&m=#Mpxu^Yq!G z(a?Jk$c8GCmJftx=L**esue-?g}7V%Eaeo#Ki093b&&gX6$FDnK=4l*1SjqeMxAGo z>p7bD20z5MoMZ4X1U4I3Gp?kBzwb5iM;L-kb=yM8mv=w#WmgrYPxw~cXQ(%_(CERd zNzO+iDRsiGTD@rMl|GTieNr#c9>OZtO%cvOFb{&>Z_o$gHYyFYQKt}NonFqqCNkBC z*Cb9?TOpyhK#amhu6%|wVZQPPYK!QM_y+dRX@rmw6vEe zi@#H<9X#@MrXPoQRT`Z|Q4c4Dx;XiCga7WwHQgF^Xx=r1IB1ZE`;YRMsdrQ#7LILqi(C=rWbv7D{XGJiu{$DV&-t>@Q$ELA z+{hKG(miVKje1_->Q+H)S!jtQC0-m{U0E4y7yib;deu+wWpmrV)N#>Ci$Y%WbP?Ut zAt~t8_n@O#Rg^J}6#MD9^W&+VJNbh~irx`|%Sp_{K2^Xwt+plPzF|pG#PfN%0c*3p lmv6@{kIrn27K6SF_lgUfy!(pnzr7q(!wx?Y!#M_J{{l@h)h7S| literal 0 HcmV?d00001 diff --git a/images/grab1.jpg b/images/grab1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c6570c023d9939540d3c9fae08cf2aee1ed313e0 GIT binary patch literal 1966 zcmbW0YfzJC7RR3uAlxK`yR;!A7eTEHYAD6kWYkuwPN9N;EfNZ75mB<->TWD9X_?C*sd1AVP6Tl1YrzkOzz}=TU;?yoc)S+YKL&ukW?}b0o1|m9 zZp$uRvx6Z7yJ+*R>Dkxy?04UOWZ}~zb=Vdfb5`HL(#m?RjpKSJ=M5XFZlAk<;jw+s zmtXDm{CeMh-$Q=>0f)c)KJ4hRAH$DFoQRE!Kb?@6lzi^|g^L-N{+@X?CpYg}{x1cE z<(ywDZdBf^`mO%X-G;`dd(HPBw>@d^=zRL@dGD*f{@45g!QiM!JU0GrVsh&J{KDeW zvP_ODR#v%i0RIsS%OAo1#6`lmv@lt;39DQ0GAO z`T~LrQ&Ok5O{#2fLnI1`sncV&Gz)@uUkD7ulHdpkeqqhl$Rw=+ zYATKKQYdxVrY^*aCML+dJ{CnUL!h6}9%tof9PU?S2u{xlH8)HCsLByBC6~o5h?1@` zsivcQQnTD8NXuCWB!P_>WFQbU5nt76k_~{E9#NN$NGrIb6bLdal?lpl34M{Mbk7-6 z1TXc-!(YleMik>74Zdnj+zbDuWA@5NvuOsQ(;!kX7nXqcg5ZWqfPR7ya$Nm2PokIZG!OSDef58~c{=cetwy-p&~(W=L9@ zGX5Ypdi>NvYJnDOrbN)4Y?Q*MGt$Lb3VW_Gch(7l3PT2R1dVw9x2T}8)+s6%U%l3g z`rgr^^0VNV?e6IB<(Zqx#toK;0-@%BF5)WhOE#aQEz7^yM)gdE$x;;!<7AW6nHVg2TgkK+(;uRJ&XCe zJNsqZu7t#iUKfq5n+d_hYeqg2ocnrz!dm%`ibHF3nOA z34La6eNSzw(EepN*(%E2MZQ=pt0AJ_Q3lux-c%;~rD_gUL$F`T9E{e~sbk1RG3xEJ z6J>Sun!4|AIb0oM+5V(@ExfF-cFf@TY~~)nHhqZA5%RxUd?SxT<5NUI^tRSD?1N49 z4ZTPsjhA}qSW4DkmhDf?lgnv=_Qu#;9ERW`6M`xp1RL1u#%AKB!tRO$srTq|O?x+b zRLNK#;LyXP&3B};^Q^N{$Ho>J!HiQzw5`!m7D;~Nl^cJO_c@nm%6P>e9D=!IC%%)i;F(57-gsk3mJc;8e?Dk-McNQiz9zSOrVXuD zxne%CGY{ZG(DpUbR{%jCUDNNWqGqV~u@%?=N&LE&A10{r5R6UEu3QX+U>Blr$a0m= zou>*-CZ(Pn^sv2WLI~>54M}wYkuzVdT_2XzV6VB zGALppP3}JvAG+|SwbaJVBJ#k2l=>rG+)byZRb9iAc|4Qy7QDtXLG3HdfB;<&!OSG4 zR0#x!9U8Zm`JmE* zW3)WZ)V2G}B3WYGP^igJdWFMMH{l7SOB{i99OEFG-JkgME$T)QD zKj8mE00Q8E07!rW=n!{AKmz2z08GFF>`9>zh=4dKfD)*HIv9Wvn1DHWfDyQWI|d{W zf*?2|AQGY=ItC9Bk{~%UAQQ46J4)~qil8_upc1N}IvSu6nxHv`QYUml4;l!SAt?BQ zCJ>`JzQq+KM~Ivlh>2K;og_TPwU9U|kP@koIvJ1=nUFb!`v7nucMj{(4Z`4zz(|b3 z=p1!@X%8;|_jz=$^J&!+A9wy&cQ%U(>(t z`N>c1EUDkJIIH$z#nx4)XO(^QL+;s6pR3%|yy)o1=en|g9($rMbLwEXq%_=G_Tz77 zj&DyJ|9MyANPpL&o5no5zUhJLS2x}@qxJ93O&9x83LA4K?b-bO-rbM4r|xPQJ<(rR z^~trb$JzRC$INZ7*>LP?&zbJZZM9QwFRI@E!P=C?yU!MlZ0{XeacFwZmERBYizojr zYwfx^czR%6OUbXTvunD#pUE8G)>(XEwCbm>wvAbjUK_Y_>6f;fd)AEp^Vij;b9Io> zJWz9aW>a<5o1YEv=3_ad<6nAtT1D>G3&jtv-aIyUB5p~|nE1xF^xn(^ul!lpd45OU zH}9{RH>LY%#jfKs=T4}vKKFvIfXh#=kQq1T5AB(gk-w^PYTAyWveKeULyb#H^N07A WFJC*nuj1(shu>ORdwmJP^#1_FDUJD2j8%Qp?htFNA_GDIzo{CpAV&R&MID1y{1kEC(AF z(h{#XSGF2N8HK_1Lbx$jwhEgX1R@{~3ZMikpbiFL1SVh(9$*A6;En+a zgdhlx2#ACzh>pQSgd|9g49J8m$c_^Hgd!-83aErCsE!6`geGW?q0|Xo(1Qj-We5ts zpb5lij&E^A$q^za24W%>VkZetaV;cH3Zz6Tq)rB8L?&cT;XVLd$eqJ_bb~NBBQO%9 zFgiyb0ZGE-%)m^{!t5-OQ&0(uvjQuz3ahgL8?gzSb0iv~T-YNcNE9W3h98JH!g&}A zKZ(plXw*T_1Y$HqU0g|WTogn}R7712#7IoUTw+RLG-};7Miefi5L^)yNl_GCV{TzR zy2+J6nUqD@RX`;o2~<}FRZzlLhTlaQvb@r;x zf?IP23tqi<@h{7o)~8kD}9!hQ~gAc4WA}sl2DT{kikM{odWSd(FW87gO7M`Ulobt=c#?`bVmC z`Kj^61Jd2M?>6}7$KzU2kyhNecX;eFR^2qYU6~^vb4PBWnp3{s+x-D+K@m literal 0 HcmV?d00001 diff --git a/images/helper2.gif b/images/helper2.gif new file mode 100644 index 0000000000000000000000000000000000000000..2029b5da77e23e69d505525b42a48f1b707c4cf4 GIT binary patch literal 1207 zcmX9-drZ)E5I;p6wQTm9w9wAVLLtjonLXr2WT^NE2{a2&YgYC$H#JP+Qno~CEYSp) zdcBiY)BZq|g{MinIo4b)NzEQW$Z9Jq0XOZs-}?UX+i&0B-RE`pduZyEyC*IzhGOW4 z{|^BOfCB;`0Scf)+z|l@kOKoS0SmAvg+d?#;-COZpaSY(07hT}=HLNF-~#R#kU$86 z;D~@oh=S-CJVZ!>ncAXJ8+;0u~S zjOO?jSCkwfa$+DRVj*^t@D$fV;-o-Iq(bUsKt^Oj<`nJ&z=hm7tVcHpgEImnF$$w| zB9cILRZt~WQFS#?BQ;TTjmbxN!S8M{_DC+s!41KX48_nbb|K;nMdZd{ zOvYmDCSXE|OmR~%B~vkVGcY4FF>{M;ih+bD_hglT5<`$IQ|wKwNNhl|Uqp#ZN`@5k zi0C8PWa)$w>ynrcpJ6E!htSXz^no6r(I2JpHv0S!NKSV0Nd5^(a~PDCQLsx7tWCRW z++#;}z4PVk!*87ScERp<+cu=~7?a1rST;BLqW66X??Mq(D zDqWvj`Ra`H6+LsS%D&Dk{N%gQC!3beTUI}P&u2fhWc+gZp`#;iJJl*FwZjTK{`mIb zy435xXsJ8f-ZK4?!7n_w<&FhwUc6@VwhPV6dXA>#)Quds^mE%%Gpl7tO~XHj+AHRN zRF(1QnBPuJJ+QC!(^XB6f1g>NGW?AdD;Ma;S^a&(R+X1_uDQ; zisomlJI)qu>bbpj{GUC02i;V*W8lK_GrxCE?B71>zSZXkdiNdQHhF*L#pVg;PE>f? zo*(66ThoYFHjaIIWaZ#XpZaOd-&d@h{qn&{RUNPOjVY+lzi#NdvZ~Zy4=>D5f2;X) zb;iztpBIf^oc2V`+P3=A`TzDlvbFl2zB8S*G<0vtyqt3dPrjLV^Ukh~g?IIK)ypmj!x<-M literal 0 HcmV?d00001 diff --git a/images/helper3.gif b/images/helper3.gif new file mode 100644 index 0000000000000000000000000000000000000000..e1831d1077932b3e9b6c02b8a096e11414e3f2f0 GIT binary patch literal 1215 zcmX9-eQ1|;5Wi~6NoBdL94xyTYs*PeWA;XQn5di6$_um#_k@N;`&FuGU3u{stON_32==;aR!}q!SyxlzuO6Nat|Efx; zgmL))5P$$UAOI4e06N4S5s&~mFaQ&<0DDp>1R@{~3ZMikpbiFL1SVh(9$*A6;En+a zgdhlx2#ACzh>pQSgd|9g49J8m$c_^Hgd!-83aErCsE!6`geGW?q0|Xo(1Qj-We5ts zpb5lij&E^A$q^za24W%>VkZetaV;cH3Zz6Tq)rB8L?&cT;XVLd$eqJ_bb~NBBQO%9 zFgiyb0ZGE-%)m^{!t5-OQ&0(uvjQuz3ahgL8?gzSb0iv~T-YNcNE9W3h98JH!g&}A zKZ(plXw*T_1Y$HqU0g|WTogn}R7712#7IoUTw+RLG-};7Miefi5L^)yNl_GCV{TzR zy2+J6nUqD@RX`;o2~<}FRZ*g8N{he)}zIfA}W&0N%dGqt_Q;XLQ_8)nxuNfcPmRq_s)w8Rx;=s%Ym%e?napvOg z@|@yS`Ku*!ewf!E-i*EHWy{{6+T zKiQgjN7we^{GZx({B}=%)}}+WySeph8{B*DsV$Ee6?E0#_umcHe`PU`9Y@vl_-+2L7_K6K^i*zW~e&zXhi z8ZyqW)~8?SU9h6=wfyf6H1tiZ9B#U0{>Qh=lo{7fu9>*x-JGqHTec3@UpH-38!x|n zXnJE_-KCoP?E|B$DrTQ4soL@U(Gp#GxHl`cbKb3MQZ2cA(r0#-o!*?<^~C(U)4MB| Ytx3O9wYojMr@HQ!^xhjYGvML>0K!)-Hvj+t literal 0 HcmV?d00001 diff --git a/images/helper4.gif b/images/helper4.gif new file mode 100644 index 0000000000000000000000000000000000000000..25c25d6a881fd84ef3e494e3a58893b6900eb379 GIT binary patch literal 1215 zcmX9-ZA_4L5WfN%wn8g0E3|`_DAFof1r>QyW{B8}kmAea;6t1CVvw=LOpdf!wk3@c zZKju{F4|1m(l#cZr9oq8wPvkITtVOmYFcVd)^*SNe|Yxn|J?oF?w*I|&nvvIrV=XQ z68wJ%KmZ&N00~e49pa7%NPrv|fC*TDJt-6d5fBFjPy!WD2Lmty6EFu4Faj5F$AAPv z5ClgAL_!oq$KWAC5+p|kWI`5XM+tsH5fn!SR6-S0M*}oM6Ew$A>Vz)nK?9*O1O;Ev z1Y$JDx45F@2$2&5F%b)~lZ2eK^UA77>Q9B zog9ijqLX4@4Z{JdA~( zL}ns1>L6$WF&d&St|U1w3Zf(`qAmtvBqm}mF{LmXweA`t3YSp`t_X^xD2lEzx3C`F zba4N@R+gf+?AbshfcrnTeTOY*P#*Jh>;U1e6$pWSL@bVnt#DlKmn|Tv9Tm zm`6k($tFuDlvtO0FC}AjkoN7QXx6{$s_qEAl>1L^sLeYdUQkj z4S6ei4!rlprU|!|?I`Woef;&w1*`jeI^OTzf^#=#&0jQlq;-15&itZ9dwQGl7j~83 zR4`cn&ONhFmu#;Xeq>wmGv}`r>7cjdEBx6P`4c}?a+?~Z*|Kir#A&^jfr<_A{r;m!~w1-Xe7;zuL87()620>-+ombe~v% zzHs!ngCGC8<9Jb4YYB)_gy3a{1x0i(_epOV(wc z&E=O;|GnzWTKGD5Y2&5lwt;mG#UndkxmdJmVA;f3BNJ-Jhn`@%IyNy!dIRuH17peXylu(yGBXv$kINwx#UE#=+Ld=FJ#- bt8($Gp|`7^{BUUNiiWd8ZR68Y;er1EiCHC! literal 0 HcmV?d00001 diff --git a/images/helper5.gif b/images/helper5.gif new file mode 100644 index 0000000000000000000000000000000000000000..74e69c9207c61fe013632a22b935ab8cdd4acb62 GIT binary patch literal 1212 zcmX9-eN2~i5Wg}AD|<05S|CTZe518wrPainIzYf?fQZfHYOR@Bl1|&&jKf%|)v(ag zia0Y_(QKMo0@JQibTQWJ#F=3djQwU?)0*V0u6x$^k7v)m&)w(k?kSpEIDOi~l~4)8 z@c$tI0dPP7BtQXlh&v)60dimfCSU>fq)-S%KpYf62~9 z5F8N@2~iLogNF!7kQ^D130aUGCHM(NP#hId2~|)X4bTWp&>Tal6S|-W4TQ=N6nsGw zh|wJ1;);?ZL{1FEL@dNk5}x8(NSqW%iBw3P49JK~$ehA`0JxAlhxO)aX9G536E^2aG(@?uM@En+N&*c(5OIX_Fcy9i znTgP-gP;k-Xo$MFlH|B3h?1y?x)_L&n25Q=l)`A#x@(LmTt*?dA}ErgD7wbn!g_R* zD}ypAi?XYLN<qU-pRYCd}nuE-n@fl zH{}nMy?NKnzB$_}hVI`wVZm5iS7z_uxkx1_a=dGEW{aV@h3C$4VmYOA{Qk)CBw zPg%HeX5Dl1GS>`MH!S&PR@sNga)0`?cG1eMrJsHDb7xln)rY!oyyN6S8PPbZ?D+3L zez`s^=RjxE*`ChQk(WNT{EewK>sE{{X#RWu%AxKN`AylAH|;H{_skt@MrP)xHoSGQ zWApOf)n6amUQ_yV&ok%yPPDHW-q$nc{1ZP+uUNQb*XU_~^mjIP|6A7k@#&$5b`G}| z^xix0%eUjtZR;S+e%*Kk$88PW6Sf z;#1PK>vCCjWk=D?OOGF3h_%1%8|Jmc*|(mmz3xD7OT!h{rv{ql7fu@7 XTv_$_;FjvgJ{Wv`@tV|pg8TjhsmUl; literal 0 HcmV?d00001 diff --git a/images/helper6.gif b/images/helper6.gif new file mode 100644 index 0000000000000000000000000000000000000000..5573eced174f5df5f7d9f01b7f2d077a1892af35 GIT binary patch literal 1212 zcmX9-eN2#L5WfT*u5x`SP(wXzQ&g%Ii#|-bPzV*ulnhPcw5=v-mJV8N>P=jjIk8~@ zP2&o4Wn1Y#>0-fEhHS>H=0c}tIT+Kn3I;a&y6#=iAMf5h@7?d~?tOSc$$j^(s(=dk z1O7h*AOH>sfCMOj4sk~WBtQ-fzyvJ7o)ij!2#A9MD1i#7g8>+U37CTi7=a78V?Y8S z2!bO5A|VQ*WAG3m36diNG9e4HqXa*p2#TWuDxnIhqX8PB37TUlbwU^Ppn*^sf`Tt- z0x_E7TU=3cgvg13n23egNy1ZH3yG5gDUk}PlK~l#37J#44*(Z(=dd2#APmk3jKnC6 z&XGqzk}x?lFcY&dJ4@sgRKnt{z)Gyb>TJM9Y{KRoiH0Z__Q(hlMM&5? zA~O*hbr3Xx7!6SuSCSkT1yK?eQ5OR-5)(0(m{J&xT6c{Rh07=eR|G{;6h+sVTUd{7 za%E5^Wl?q&P>Dza)m1^2R7KU*K#kNy%{3+;;RV0D#n>acAO|-DLoyUYx7dY!( z^URe!hu;0F;fC85?kzq1-q){Z<=33+Ioy7{5$Em5Ua+LUt0{NsJ9+mndH=+gyzJbN160mTzcTbmZgn9oZMhA3KqG=ebTvX}rGd^lzuW z+@3b&^NyyW-i}4%#yr2a`R?ki>nG0L_xI5agC|n*nTbWWpnC5IYf{R0oh=yJ-aWM9!0buGzwhUlkN;b? zuVeJw$-bJ_!e95ztL^A~E^|uT(K$blRGsN)Tc7pdmA>IizqDQ3wR+^AzebzSZ-R`L zzS_$VHCJyOpEC_Nr)ErhqdvVmGpByyxM!=kUaYFTP<-nHFI{+L@~fwH+r&SQ{M0bL zvw3Ri*d?VEJ9CSQpRTGu-&6f0Tz-6o%pE(UfA{>1Gpm;0k@i}DSxLdA{-(txGY0ll WEL$`1X5}*<4!pIp?&@NK+5Z91uOiR@ literal 0 HcmV?d00001 diff --git a/images/helper7.gif b/images/helper7.gif new file mode 100644 index 0000000000000000000000000000000000000000..4131772dddde8a6e0fe543104032209cfcc7bd22 GIT binary patch literal 1205 zcmX9-Z%mhU5WfUAEGsij+AvNl!+&eVqMDi)mZJWs6lPM1r*E31X*%3$L(ihgv_Xmn zG>J3J6>X(&%Ef}KOx=hq=fWno3K(hY4-9av^15ezUp#yEeeOR0?w-X<7CmtP+7c*% zEAamz00D4703<*Gbcj15AOUh<0487o_M}hvnSjNJrGD3K{{3Z`T#rfvpiWF}^Au}v|M@Z_GX5>R3Yl4Xj$i4}W1s-L}* zdGpL?P9Ht=#jf$UFFjaz?Cmf2WaX9joIciasumaS&R(*jucI!v_^sIwu6U<&$Lyl^ z)UA1asW+&#h=Z*}C$cbzS8z z%zAS7f*sq7vbGJZswz8Ekb3{SsTV%lT)L%U*~cGTY|H-nh7+BW@9t@rwA$-a=l?kO zd38q4r)_nEU2V(8j(L7V{k>~m-Zbf+4W8Lt-e~;8(tb|({ zx+^X}T;II&x3SeZJI7rf`0=Ij`Oog%JbGtt*{dU~s}60wvV7IkRTHLVfV}pqrddlUi-$#*_wi{)BE-oPJgd&Un>7nU)>XnX7ukb OS-HOdz>OK{F!w)GeItPY literal 0 HcmV?d00001 diff --git a/images/hold.gif b/images/hold.gif new file mode 100644 index 0000000000000000000000000000000000000000..d8e1136f83616f7235e28ec67a3498e058f99b91 GIT binary patch literal 915 zcmX9-JIIh_6n>IFFLW8y#h-=~Qb^?BAS5nN2;IPzXe&4=?m<5hA@w8<4T*~gKZKob zLrzJJ5oc)liwX)7YRXA)YYIU)J}_6W9mXieG_XnwGM{OT=w^TO71t3tOfbn5b0~ZAwWwi% zMV45@2AgcLhjwp(5oglY-3=us0~yRv#-#HwB$b>@WHM8klX6a`Qfji0#Vln_HnN$m z>`5nTQKKAZgr#T&YCmusc5Y+#vt%xzu7hce=myvMO6!aYDypO!HPlo~J@S-n)U`9^ z5!s~+F%_s_g({{zH(Pf%rxKN{ROOUVawJBbDpavbRa1>>R;zl-lXrOLpJ|WX$(bC} zfev=4W7@mmIIW1&iB5K^b6RL|$<%bAi(TrPZgjI--P7JC55%5k)+&L^5Y{qzZ@ePj zfVE%ba>+F$&%@C>*|l`yvaV&`K5fa0E!3J!Z*+sY-=%(g^6th%@OgGU)<1#0Z)5h| z+vAu%+PiP_jh$~lKXvhu1CMXLbmPqPAMbwZmG5`{`}e0$Hjlmg)sa8X?p!*2_=6wb z+kfttD@Pyx@%*9JZvDD_{GETE_~yH(f4_G0!(EU4{m1R!zBqRI>c;i0uYdmZ^tlU< bzQ1+n)h}QF?E2RBUw3X^eDl!m4V=6WVttRw literal 0 HcmV?d00001 diff --git a/images/junk0.jpg b/images/junk0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9aa4faacf5c3ed37142ea05ff6f7eee16bb075e0 GIT binary patch literal 1009 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY;EkI&+v8ixoKvLX18nQ=I5pVbogx*W8Av3y-oeLm%-ehF;gY(ojZ3bqUB4SJF9C| z+C;Ubt1I{4{Acue&zk)I44p~qjOUadU%1ZupRl~(e})V0{}~j3_{i0uqamyAB#V~r z+Z6rl$YJ>j2^&OSUR@tmvsM4p70r`&v2q*NUF)6xPc~aBZ}PYQ3~#yTtDpV!t)}PZ zu{U4XuLLgfT=vo~|66^}p84j|{}~=doSl;{Tl^}k{g0ZR@_&W}{r?>Lfz~fZv-X;8X+mg7h2zW_aS0*F7F)E`QIWdDofKf@Cs{xR!X xFV~mlnm5h0<37E8$x@gWIWN5b@WsQ$rv#RsJ+;{T=d8SU5uN6%-qruV2>{IZnGgT~ literal 0 HcmV?d00001 diff --git a/images/junk1.jpg b/images/junk1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e01ea0827a62a85bf55871878f4098a4f742666c GIT binary patch literal 344 zcmex==$VSiD#OVJ425t@p1qK;LMnQ)E zM;OFG<^v5!0&MIYKnY_31_owkb`EZYjGz!Rn=lg#yNIZv5hJU(YFOfu%N!C)YJq9# zOP4)*{QnjM2goRUhUXs`WbNLR)RY&;X5G)vb8(S7?72nAG$C`UTT%W_>m&dA|MLG# zzY$<967=r5*VX-Q-(*Z2ulK4O_FQd>bD8M5?`xj$-^iM~Z}+dbV4~_i+xFNw%Vvej zXXjqe4c-2tZh2IU+@~!WOD1iQ6k2lsk^bE-&GO=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY>u8hcl`XHVN=e(v(Mjtwy%1>JFoD2=kegkIEMcW zEyw?w{}Vd@EB#yk*Z8-2{~5ynGcdl6VQ>GZ@megd{@a%LTf4vgtT%Fg`q=XK%5z0_ zGuEws^!HnT>fh;q*DkEjdjEOP{x93xPaiw;_aaDk{WZr4e})IP8UGntD<8c7#r&V)$(j9sLgnl~w*OI@pY)%hv;4N* z)o1mm^Y!!Y?te4qdHKsYpbxnDkJ*2b_|I@MWB-p?=jCTUjjY!b7MYvr^q)Z}DC=9* z&gkm3yL5dv+dNh|wX?wDs*cOU+Eh_X?ORbhBeQ00UB77aji=dH?d<PdG`qC7xA)(YIClTquJ!%@89uZ8XV~_i;kVzuaMqT! z-pWVAW^GA7nZ9h>-1%S5cb(o~`r^YgV?m2sqPFw3cU_;BYj2u<2icBKyS~4d|6%`6 zX#d9gBgfy=r+&77+COu5+5K;AhTFfcXI$K4Fm+{`(OT1tbJwb}GmhH7Y?phGeerC1 W$DCZQX-~_eJ{{Bix!Uge|C<0w=$VSiD#OVJ425t@p1qK;LMnQ)E zM;OFG<^v5!0Com84xogY00RRPI}0lpJ4{MYh=GYsSVYv2k(rg9MNHf%QBg%z&Dg{- zFsV`5%*8c0x#|Bc1`d#E_6+rY32DZWi;gNS|2a{)%-xo~e91mRvq#fJ7^AM-5&S#j zkd%&|R^1hUIl=P=yD!dZm|b++M`>+FoaO>g_M1J5b5C@v{2lPE$ld19$ABWWJ6r2d zt#!VCuu;YS%$>70&#YghCiuQ?=|v8Ir$g!wT{fG}pLgn4|C)Dke{XTgcpf`E!?ydV z?y?j6Y7dzvelLD*xRG)Hjg^^PT4BqcEM3vi{PV?;ExtW%j_t>sj@bRUUY=^a>HXS- z&amZ^GK|eLYQ_b+t3PH4Z#mZ7w$2 H|GxU zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY?dyH&=D-v3ee`{CC2^Z%}0Sf846 z`{{p%rFVRvrCa`9+>=mS9JT+$3j0@y{~1o||2wy7>ERo5d_+D>>J7a<_2&9ey|DFb zx4cMpZY`W~Dr*^Az?xm3PMx#eIpt^6zHOJIt0dzTK7Q+8UnzgXixu}x#g$-oxA(2ev#$*nLV|S_TRDF`shm7mLFYPem?GQ zS}A#ZwyW6N?R!PGU9NtyW=*bpxAys4&a!@{i9vU6X?T8m``%G~@wV?5BctBD|6~7Q zcf{V${~5L}{del-_R~Lu@{KLe->oxj{CYO)Kf}>^{~7GF*K04@v~+gjh6{lU+q!FG r{(k!%?XmPz)XUnQjPw~cvZgX-e7s*v?JMqQXNpQ!>Xz&~{{JQbo`|j2 literal 0 HcmV?d00001 diff --git a/images/junk13.jpg b/images/junk13.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d990f9e01498044e678165f44d617720b1e2f10d GIT binary patch literal 965 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYUUh{|txb{pkJA;Pn2V-|hblA5Xov6UwOPtEv6F{6B+;{jCqHyjWl~f{7TQ*ZT$xm5 zee3k1&$0Y$i+10CWB-6|OU-ktERKcMP4~W>+_did zL-jv8`9Ed?J;C^&!Dk=P19JZv-oE+I5c{8j`Q?vq>$rB`Z<#M>|B&(D<^K$w_TTz% z|5^XD^3%4Q`~Oa-TmRh^INNEAl?UpB2f_B+p}ki}iytIauHm&;!3 T&sKlA@nE2<=!-e*|8D{SfX{{V literal 0 HcmV?d00001 diff --git a/images/junk2.jpg b/images/junk2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4bfefd6cd27cd4ad4cf2913421e8ae1b6b81be9e GIT binary patch literal 859 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY5I?r*zyum1R)XtUb)Gi07G zk6*a{)t<|p8!Sux6K<~zee1_Pt5)uGuDto4t50 zMyv>%BDy_x=Iq=h2WIbi{5)Oa!8&{8sF1+eopHX6r&j*9kyT~+zU_VO?cHU&x8B}% O+9^FKRQAdF|2F~uU zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYQ*wy7;z>ckgRtui}*-Rao=m`f(L=ANJHH^1F8-(31%S|;jo;jJ`_J$*b${90eUD|e>-O=j4)V$?pM3xHw!QwZby!l}mim|&yqc>KJ#pDu z?brIH`eo<$ec$%Bk9{~2b?|GViw!_C)C>!UyPx7Tm5yZUeDxB2$ze>UCRp7*|Z z-qx>@M>E`c9^Bh>`^m*0_H94wl=c<#_*&c(d4J~JmS;VaE`2Yro&1@f_@AEt8D59SE{S>-b}#>1+v;zBZ`}OXw=w5f z@#S?De^&ji`Ok1IS!&Xh>85X=|7Tdb(*E^@zqKh-S3Ov9X`#CJ^x5tuU(0Xv2TifJ M{biT^pW**a0N+T1LjV8( literal 0 HcmV?d00001 diff --git a/images/junk4.jpg b/images/junk4.jpg new file mode 100644 index 0000000000000000000000000000000000000000..033d1b600e06c74bbec00671c286d78c1da93926 GIT binary patch literal 1048 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYDgS3M(*JwJ{@bm6UhB_QNUNMK zwB+U5`r*Tr`KGs9qU-)ldmEp;SvaV0)uo)T`+sE0_sV~<{Lk>z2xv%e_>0;)uj{Wv zYo>Qu=JB(Bjb9zqqkq0GV#U2X)Aml&-*8{{G0p_?=Sg3 zVykV=Z?0eJ{P6voHE-|#Tl=4({@KH-zvtEa_hmo-7<4$jP91 z-KxERd~2otpS1p;|4yvi{z(0By;SVq_J2ZurT>Y?oi~1S|7F0B>fhSd<^LI0*WdrS zBW{23$;aU zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYtQX4Iy%)n?lMP0RhK zeeC_Y_sQD&)bn9gcmI9To@!t8ad%vaw(F8t+S~t@Zi-j7e!DOKPo3+xp4$7f^X|vZ ztq$G)CjM9De})tFf2(Fav(VZ0(_B9F{+vIp-;-ZoUjI5O^yQO1itge;Yh_-p`kMLa z)vR65c3%sev{F|$KU?&4w$sNeT{GH6=GqGX+iUlJrhm}%Q=k4bT>5u@&VPo}wzqfH zg=7U*?u-AWe#>zF&&=)l{^wTyXUP2dpW)N}H?!++-rxP@vHZ1l=xX*_K9i_<%-^%J zZTgnxZ)IUcuh;Lmnzq&dU*f~+_U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY z9^c-b_kPD>%Uf2z!gxi(S9|qZ83ZgB71^bl`d#iWm&k@MSFH>KyKVxx3hO@q6K6jX z|4U;3C$Ibe89LVSb)6S%KKv;6?aGzW*-PGjpYdpeL`>|yjef@4?wqua-+KQ4O#t${ BVJ!dv literal 0 HcmV?d00001 diff --git a/images/junk7.jpg b/images/junk7.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4fea50f69e1fc76faaac81d359f4ed84be5231ac GIT binary patch literal 953 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYDgS3M(*JwJ{@bm6UhB_QNUNMK zwB+U5`r*Tr`KGs9qU-)ldmEp;SvaV0)uo)T`+sE0_sV~<{Lk>z2xv%e_>0;)uj{Wv zYo>Qu=JB(Bjb9zqqkq0GV#U2X)Amlkn!EXW(e-{k!xV|F+uYf3+lP_8XtL`ETQO%Nuu%FVDOB`S>5> z@?-tKgzY~qPyf$wJo|NpwDswNo4j119|d}*n_iw19QSA5+55>nzLuv}XBwZ>{<>2(V)!P1_b^OAwpW-y0McCwDty>#ryxsO^%F^slQQz{eZ#F;Z6!`2} I*p2@;0obQ}0RR91 literal 0 HcmV?d00001 diff --git a/images/junk8.jpg b/images/junk8.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7af43e005981e29364dc1edbf92c2b2e50905c7f GIT binary patch literal 1142 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCY(D zpP?oE+<%7t`#)w!-}}2*zW8sZwb|2OrFYLe#%s?`tE{u@`B1oG?%VRS5=&QQ-z(qy z_FJ;Ht?YI?b?b9Rdrq}{`f;^;@4BClIaZshzBhSaUE6W)yl2rnd9i=|{~1mg{}bTn z`_FJbe%pVBW&as=ZvLD7pJD&yk8k7n<150O|1%u6{?Bmb;eUoH_y66FGw1v0qj_z{N|tecTTFk-Iw=%$8w1~R==)aO}nzURr1ja$6d2( zq|8@Et@iXfotLp&`_}FGxpOc6+RFLZ;L4L%t81jZqL!}OGG)!SXFY4yXWRNOUHxSL zj~IEu`WH$68BS`~|5NJkt{1d_X!q~Te}+!`Z{;^??*FX(T>k#%zf+H;ZGT;72YUR& znSv{+HYp-Y^?KD$r~P`puYcj^Kbi+W9K0~)Ggsl1=lNxUJv(#moqKDSn!dFE|4jfv C|L)}g literal 0 HcmV?d00001 diff --git a/images/junk9.jpg b/images/junk9.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e396a1b76b20303acfc7a2c1409ba6692c2b942b GIT binary patch literal 1231 zcmex=U zW@aX!`+*(+s;&jfGq4D<3Mm>ovIz$!vMUve7&T5@$f4}C@t|nX#SbdRNkvVZTw>x9 zl2WQ_>Kd9_CZ=ZQ7M51dF0O9w9-dyoA)#U65s^{JDXD4c8JStdC8cHM6_r)ZEv;?s z9i3g1CQq3GGAU*RJ2V zdF$b$$4{OPfBE|D`;VW$K>lK6V1{@LNJ2b@<}X2@znFm0!om*n7b88f2KE_o9%~}Y zXK;@p{B?_ghnW!=dCYZ0UN5(0&9B%U@=^Zq{7wHE4%t7<|KU`>#r)^} zj|TmLzvHKG&%e*RIq&mj$@_2Pc%#1lypt@>dF4mGX?=Np>F1@(KWW~tEZQ5s)vH%7 zRMXSXGY1tbP6Go!Kp$+YT>${f}48-QWNIGyIyc z{(U8?ZU4GTDO?sD&Xy-oY;Gc9bz zx=vqTTqFNY{*U_oPYM;{zpdZMfBX#$#e8#MFzo!dW1Zo~U+L>@S2Gh1>TA5fP&y{3 z{4xDz{X>N-bvM7o{_}sA+@JS$_r6Cx&of@XjO)Lewf@e%FZaJMTej;@cwTs2;ik*M z&96=Fzt7F;{=KoV)=pYgT3<8v^}_xC8Mxm6&i?1ZoBU5`z4|}<`iuLHeyjO={_7d@ zcZa{c+&*tn{|_%ang0wIb^kM*`g{CG7<>1g#7FjGwbTCz@w&gApL+kvzh@TT-re5) zPUBoz-@d8Mk(UmJt!CL+oV#{ss>;7So32>hcW$?{cVAj(G}Y3)t;zF!#j<@~G3V^+ LKJTA){Qpe=;kzW< literal 0 HcmV?d00001 diff --git a/images/monitor.gif b/images/monitor.gif new file mode 100644 index 0000000000000000000000000000000000000000..f745bb6c4aecd28d0b02c363a432b3c0f18cd1b0 GIT binary patch literal 1034 zcmX9-O^6m`5PpaZMH0z_`GZdCVKIf&l@&#qN>bUp#4bUkj-m&(T~@pVEj8jnTtirb zA`dbtCPrJk1S)ATYG~zBfhZ`7!Uj^EJcJ0<^t|*QK0fA~dH!a;4VzwD)wR6`g2(v( zDd0e{0#S%V3aqI@9a=EJ6y~sMjjnKq7Xk=HIHHh1D$6T?ol%mS5m=T(y7AXCIanL!9(NB}vgt8B$AtDFZ$C9^K z9`H~P_b5+zs;7IFb4xVJ-m2h==#q`75QJ!mhg5KHw9aX*FobEChgCSj83|D<0udVF z5fzC@jr7P0Zl2+hzbd(QCP#8q3Q{!1Q!052jFXDA(vYTUo>u8d*Cx{|0~wm(8I_4l z&GgJlUK1BWPgU)dpv@54G4XDABD{chU#iWewk2^NjGoE1qjPQ6y_u&^TB2eKr6$r7 zouHg&E5E()rho&!lYSqTE1uq|de#M@5 z-rYBG`RKe?hk7P2-}&Qk$BN^3&o4jKeQ0U#w82d?cD(*!*WPc(XAPhJd3fFYXa4zp zU&pmi*MBg3*ZIyf-+#Vnc=f3%E4SY~vtiPSi$i~%?D=Thk+5^ z;P%;pi8lscJon|VW9$F?>bt$mzTSG_rALeJ&FNiwf9U;ZXZ}0&ll~o7`wyJBcX(jz z&5@69ywd;PlWh-wIo5S;QeW@D?r)BC4;>x6v;U8uMtZLt?>N@kH$Kugf9u+={r&gP WZF&6L=D+tmnz(#vLCu_wHU9x=W6qoa literal 0 HcmV?d00001 diff --git a/images/skyguard0.gif b/images/skyguard0.gif new file mode 100644 index 0000000000000000000000000000000000000000..5dfa87592e06c2ecd17c0e189e3d68a36858b9a9 GIT binary patch literal 922 zcmX9-J;)Yh6g?jVemF!RRFJ_n5hYqwvP6dil7F~-jp1;MCMU5Vq~%zGAcB($L3BYP z2XXKxT7vtzWNz(FjkyNVbUP0{!^_Kk?>&F_zNgNd{P2TMcO&o*{(l4nj4KEtgc!I+ zf&vE#B#}bSY7`+sg93^up#}{!(LxW#V8jSBVMs8bz(gQ|5sH{F4;fT&A`!_*MNY{4 z3@J2Gh+>qYCK}OM=_g(_C5YN}DqYE@5p^A6AaGwroIIg?{L(7_IM zO#2obrxkHJ(aBDAP75tAnVK$iu}fXkjc#_Ud)n9Jh1k=~Iwf!!!a643jZefEuk2yN*s=*0s#rr!85rg<6y8jc!oSyVc+J{QC;ldvATL{{%L_!p7$A0~fXZ z?dGmm_f%a88;arf=Lf1dy4@1M5socsFZM`xeB`~1g) ck9Pk0$&;5`4-WlsDQG1<7Ddn@Zv-K_NZK}( zJ!mQZ0iz(@?n2tMlNPphAGMjzkA91fkNIZKYvw!g#%nLWaDFcWf8+m0K)|?yAVP?N zYa}RekU$bCrkF$7lgpxp1r}Li z4I6B-#U9$d0Y;ojTlX}Sm<(hvLm89K!;n;RGLgwlWlqXDnM$e2LKd@>HQC5!wz4Ok zs6~x(oDr6y6{!8daoD+y+0T->gt`x=F`@_D=aSYN6;xD7HEO7-mU`qZ*{FMG$}6%< zH)1MK!3tGOd2hDvX-*|7S*gk?q2x%6I#sA*m8zy1)vQ+alsE72%sYsykoqdV0^+>u2`e{%Z5+$@|++?Em!|Uitj~f%h*S-+JoUdmsLM^TNr? z&%AYd>)_G9w!eAq)dx2=KX~`v)yLod_u)%V-Z=I3v5)tk+qre{#P!3U{dr~cqw}YJ kIsNAIUwm@*$KSp`_rsAtcCH`#{o8kb`tI(|vw@fY1BQ-};Q#;t literal 0 HcmV?d00001 diff --git a/images/skyguard2.gif b/images/skyguard2.gif new file mode 100644 index 0000000000000000000000000000000000000000..4e7b228202c72c66e537e9c8ee3b5a018596f1ec GIT binary patch literal 918 zcmX9-O{*4U5Iup=C8Y=wCBmk1k>cV)3nMpY5q?!rT|opF6D|4yZAA_hE-HdjNb#d7 z6r`Qp&85{`TGg(NKR|y(2*P+Cd=@V+^Uj>FnfKJ0lkXq@;td4;$MZ)(z_@}SLWqHD zBq(r@KoTkBtVR(MG$^2m5^B&u6D{;$3`UGF6NUr>3QPnd7@>#>^N>LWClZm2ROE!r z&yYeBg(yZTYN8R%Xhlz0=`cnyrh!#jkoinwL=XEnm$;tDVS-7fm_yl<%c6z_7Fl8q z8*H-09@@PDMx04o_cWB43}i4v8I#V#kW_Lqk;zPDPRco%N~y_07PFK!*~n(LvL~IW zMU8Tt5tgDAsQtik*tw0_&yu->x(}u?q6ggPlGYm)R8&bdYN)A}dgLwHsC#G1E3!*B zVk%I<3RO&bZ?^7fP9-W?smdv#s-_y%tXB1uH}CMwKhs{jlQTJ{10C#8 z$Fy(3aas|l6P@f-=d{q`lBwxJ7rWFo-RNewx~F|jUWh%-tWyG)A*^Ha-S|X&0qefV z<&tYj-iM=ivg_!?WnIg>ecF;0Tc|ae-slGPyj%V4ttWf1-m&$u{u9{v8ZT_@*{s_A zcH`BTFP`4~{qOJgzIpc6=?9NKymIipmoD9Z@R&axI`PfE8~^?B&((Lg{=9hM=fh`z zJ@)0lKkj_~&PUe|oVk4W{`TG7JBMC*bZ%!mKDm18#l!nw|K-T1zn#4K!N-4H`|7iM X=Wl=i^vP>SAJ*2rxA*_B894C_;IoU# literal 0 HcmV?d00001 diff --git a/images/skyguard3.gif b/images/skyguard3.gif new file mode 100644 index 0000000000000000000000000000000000000000..07f5e8f310b4a05e9247f62440b86bf4774fbdb8 GIT binary patch literal 922 zcmX9-O{*4U5Iq+zc!|3R1UI#qTM>ROgwPBj4hW`FE4M}?QDLhB>0@{3;>tciH!ch( zaoLZUK*qYCK}OM=_g(_C5YN}DqYE@5p^A6AaGwroIIg?{L(7_IM zO#2obrxkHJ(aBDAP75tAnVK$iu}fXkjc#_Ud)n9Jh1k=~Iwf!!!a643jZefEuk2yN*s=*0s#rr!85rg<6y8jc!oSyVc)z{@uiSN7u*tPhjh7Y;0{FtNLws zYv1<82giOny}P~d-CNJT*tvi0<<~#oJNSI(_n$V8e7E=P%e!a3Kls*H@4xfpwTIV_ zeDvm(b5HKxyLRH^KllE)@X3Rp-}v^&dpH07?BSiWHx3^^f8o-j-4AvTTzqN&p}%gN cy#479-yFaE^v;K`yx2Z<<=4koH#TtUKbbO*q5uE@ literal 0 HcmV?d00001 diff --git a/images/skyguard4.gif b/images/skyguard4.gif new file mode 100644 index 0000000000000000000000000000000000000000..26f8f046b248c53e51216e7f03de25ce31c9bd43 GIT binary patch literal 931 zcmX9-Kd2UT6g>|f_yU6#w}|_YK+HjKs3_uuWeG+gG)N6Mq=rXBH3)78Z3s=H(9PjK z6vS$D5`r5Tl|vMQlPyheY>QfM=SRQc zIU(~iq|ihmicyN1Xhbtw(GylWj8TkfV3ihRKGPV{!~V@Bt|xMsV3H~3Q1;}qs9}Lc zmRQ3En{2U%c5i?YXVTU^4J9T68O%_|r1LN&m7GjuGE z?9z>x3RJK{6;s}ut$UhNiAq+ga!M#U5~EHPs#v9}sYW%cRXyd+J3RBxwAb$BOpfV5 z2Rqa;?OSl1R>bKey4kJnXzI5uJ`rEQ zx-W9M3;9XogG#ozyY z{p-WWPk(miw+|kCb>zT>`)?k*{p;s1Kl|@@=Re(h`|7K2J^1L(-8&C&KY8|eR}e%9 zF>s9p1r8EOB88mQC_;h;1r$+24H{^og&vH-h!JMOkYGT8i9iG+6ft2QGN|B0B9f7c zoRIk$QfQ(O#VAEhG@==;=m{$w#wf-#uu2OupJ|NfVgKe5*AqERFv%2iD0^~Q)Ud!J zORQmoO}5xWyEnjyGimFdh7yy33}z@}(s>w?N=_y+nW@Z4IVV#oHCf1Fma--r+00h< zq!YEMQI0dhQnUiKA2<#>w=w%!GM7;I!8Atnfcsq1dZU7hDyc>dHPup&yd@iT?@W0` zcIie;1u9sfiYf2S);-OsL?tU#IVF@FiBYEtRjg9gRHK^Js-E)Z9iI7T+G}@mCdYK3 zgB|La_ANM0E8=vblb!0E7Ft{~HC^apm%64K-RxHPw6Dnvv8S1JO5ietbxgh+pNKDD z-50rBaxKaGaP&@g9i6zWYniuCTe4ycwIKK05W>jd%7PyYby4dv|~T-u}04UD)&Bhu?f~=<-hou7AGk<~6>5=eCzV zi<2KedGf>y=ij*h_$N=ldj8+PzIgeEPfy?6{Qcb3Yp1?^<;TbF_~(yXTf+YT0C6vw A*#H0l literal 0 HcmV?d00001 diff --git a/images/skyway01.gif b/images/skyway01.gif new file mode 100644 index 0000000000000000000000000000000000000000..01e8037ad53cea8d5497acf5d88e1f425c4fb7f1 GIT binary patch literal 927 zcmX9-zv~us5PpJ&FQO1-VBv6~h2IDx1QTm`ib`9WzEXq3h0q)=EkX|@NFt~dO%a!* zl+hG4M8g^1LIks+ps7Xw0udq_uIEFa;pOGtyXV*4d+hbsjy(VNUIhNe|BrxxaRoty z5ChjpP~aeeBvQy(jUpsyP(TqS)S!VTTIj(Tj2K}i3<(Alm)&W+`j3ks8^l~Y2=kr;KVP{k@$O*N`nt?DUn-r<>lroDD2XL3vj zI@qC(Y2Sk5v?5L?I@zhtX`#g>Q`3bmcByN+(ammkPy3p@5PO?F3KY@+Ycwl4i zfp1hfm&kh(DdZ^Z3Ct$DjLR``n&=hhI5<@eVKSeCges7JzW?$c ok8N$j zMI3~hYPyPpgHF=c*4AcA*m64`eZ$Ys{qH@md;cS^AAaTKcXuH05B`4y1dJ;PB7_*Y zMuGwd2_%t1&T14PL4yK{D4_-oG|@s2#$dz{4?#fJ2{hMI?%xm zbxivf9H$j=I?>5abxsQ{E}5Dxbg@fa(~WL+t9#nl5Xns&%4#%c0SmG^py|bSv<7avFoGn zZk*q2-FE8sW4!t0pWF9*@!H-WZ(Vr&sh94&egDZLUp;Z)@&X|d;i|o2Y$GDY4`6t jk6+z;?cYNuU%YnW`swShK63H+2XFoS-rYTqZm|D9u!D}i literal 0 HcmV?d00001 diff --git a/images/skyway03.gif b/images/skyway03.gif new file mode 100644 index 0000000000000000000000000000000000000000..5ceeb28c19b0d8ca177e772c7e779c5b7952587a GIT binary patch literal 931 zcmX9-%j*?n5IsWR0}Fys3XzF|OkG$D4cr_NO2b_bidu}&PKt*Ota(WK}|Kk5gK)|?yAVP?N zYa}RekU$bCrkF$7lgpxp1r}Li z4I6B-#U9$d0Y;ojTlX}Sm<(hvLm89K!;n;RGLgwlWlqXDnM$e2LKd@>HQC5!wz4Ok zs6~x(oDr6y6{!8daoD+y+0T->gt`x=F`@_D=aSYN6;xD7HEO7-mU`qZ*{FMG$}6%< zH)1MK!3tGOd2hDvX-*|7S*gk?q2x%6I#sA*m8zy1)vQ+alsE72%sw^o;*;3edwj>so7b+K zytMnJ^Jjng=g;F`AAbApt$Xi2_3Orgk8Xc=|Gj;8F7e`yzh8g<=~I`FY#jdJuV?rD p@x`lO?mf5vm3zPaaO%fTuI~Tp%;xojcfNn{!(C_Iz?LmI`X3?hl&}B* literal 0 HcmV?d00001 diff --git a/images/skyway04.gif b/images/skyway04.gif new file mode 100644 index 0000000000000000000000000000000000000000..320b7862c46052d930084ad97f26d6fc13af2a4c GIT binary patch literal 919 zcmX9-Kgbny6g`Q>2Z^X5GwCX7P{6`V*!GE$Kf zGCo5JO%$RSrKpKUG@}(gVWz_v#TW)=X+p*`j5m7Nzq!QqL=F>7GQ}Lqnp_q&EU?HD zYuI3uE%wmry;N>-|JN+{V9Z=EVsu}W1_jcQh_ddio#dB&e+c6apI!H5K@}Os2n7$57;V15lol`qhOJ01rdt_3sKUz8o?&T zD8a%)60y*3d=v%^A(h~7NGoER@qG9dm&@Fl^P0IYy|TS^YWD~N|KR^eK)|?yAVP?N zYa}RekU$bCrkF$7lgpxp1r}Li z4I6B-#U9$d0Y;ojTlX}Sm<(hvLm89K!;n;RGLgwlWlqXDnM$e2LKd@>HQC5!wz4Ok zs6~x(oDr6y6{!8daoD+y+0T->gt`x=F`@_D=aSYN6;xD7HEO7-mU`qZ*{FMG$}6%< zH)1MK!3tGOd2hDvX-*|7S*gk?q2x%6I#sA*m8zy1)vQ+alsE72%sTFFo?{&Fg0lp4$29kF6V< zw+$tCxO!_Wb*=?cNej{|9%Zmm&ZF literal 0 HcmV?d00001 diff --git a/images/skyway06.gif b/images/skyway06.gif new file mode 100644 index 0000000000000000000000000000000000000000..bdf34b303dd6d8459588689e20b31cad52157b3a GIT binary patch literal 942 zcmX9--^(9z6n(@Wv!mX04PnQx8A%`X&PZ;QvQJz_@}SLWqHD zBq(r@KoTkBtVR(MG$^2m5^B&u6D{;$3`UGF6NUr>3QPnd7@>#>^N>LWClZm2ROE!r z&yYeBg(yZTYN8R%Xhlz0=`cnyrh!#jkoinwL=XEnm$;tDVS-7fm_yl<%c6z_7Fl8q z8*H-09@@PDMx04o_cWB43}i4v8I#V#kW_Lqk;zPDPRco%N~y_07PFK!*~n(LvL~IW zMU8Tt5tgDAsQtik*tw0_&yu->x(}u?q6ggPlGYm)R8&bdYN)A}dgLwHsC#G1E3!*B zVk%I<3RO&bZ?^7fP9-W?smdv#s-_y%tXB1uH}CMwKhs{jlQTJ{10C#8 z$Fy(3aas|l6P@f-=d{q`lBwxJ7rWFo-RNewx~F|jUWh%-tWyG)A*^Ha-S|X&0qefV z<&tYj-iM=ivg_!?WnIg>ecF;0Tc|ae-slGPyj%V4wtqLU-aYGM{U@;Ree7QQ#x+$x zp4oTP&6`gjzxdO;`w!mm*w(2_SI_Rb>%=>sesJ;0^P5kc{`SQKmyf=8>#?t%-MR0? zuOHrVDHqJ0EWy*?HxM*RJ1x>hMcny!_pRZ$9$(U(bJY=NCVmhXQ82}*g@u)1WpxxHlEPxO5K);# zMMQ+Stc6yy0mUwah=oOpR0=kNAli)Q;w>JJc{ArX^Nyc5_Rxbb9zx)6{Qn3D7*`NP z2r+Pt1O*NfNFs%t)hI%O1_cyRLJb;dqJ_6W9mXieG_XnwGM{OT=wbin64w(sOfbn5b0~XqS=6w= zB1^1cgH5*BL%TP?h%;&Ho`w>WfedCSW72sTl1fe{GMTB&NjWD|DK%NhVwSQd8`;cO z_M{WFs8NnH!cw#XwI4VRJGU|WSu&SU_rWwq^nm+Z(t4wUiYlo_4K>wLkGv%tb?;1h zMRw^%Oa&@fp^7Q*&DK55sYE3!RXHV;9Enk<3RSF9)l{RJ)vBKI<{h5-XWDCbawf-g zpo1OinD#9=PAlScqLZEKoEBPKGBsW3Vwbw68{OXVZnKXCeu z*AG8)cKfSGp8WOb@0WL;-hb=shktqX;^(I>UHR+zy(5o*bN#m$o_*ocy_a|Hy7mCJ F{sTdznri?6 literal 0 HcmV?d00001 diff --git a/images/skyway08.gif b/images/skyway08.gif new file mode 100644 index 0000000000000000000000000000000000000000..7e17e172c9765f66eff2ac0de16a345d382aede1 GIT binary patch literal 935 zcmX9-Kgbqz5Ppb2OXv?oh$vn55%nn~I%v2&Ae2E=U_wO06;TE?1TKomgMLsgI%oy8 zTtgxz9{~a53W5kB z2Ck8yz(E2@q>!^3MM%(~fFeq$K?6;+(1S4;F~Uq35)3FX5r|-fA|}j31{Iu0L^4v5 z6EZ(T3QZKE7^SF*Ml_=pJz=H87{!&i96Y&MC z`y!W1t|fUNj^4?xqZ5~PE%WwiOIB>5)?|948`Se|^|wd=y&LQ8Umxo~f$dxP^`1Ak zRegVP`-AtrcKpB>x3+fNe{lB`@4s>E!-x01aPFT2d+%J{_0)y^r*3TAy7c&oYY*-G z_N!x;H=f+Jb^WEcp8w>~d%xU1b7JF%tGsyco>vcU{CMT*55D{JotJ-q@oRp1*OASe xr+)f!@8_F)&V0P@_-BvZ_~YlztM9&Y?d_9ifBWe4UnjqL zIU(~iq|ihmicyN1Xhbtw(GylWj8TkfV3ihRKGPV{!~V@Bt|xMsV3H~3Q1;}qs9}Lc zmRQ3En{2U%c5i?YXVTU^4J9T68O%_|r1LN&m7GjuGE z?9z>x3RJK{6;s}ut$UhNiAq+ga!M#U5~EHPs#v9}sYW%cRXyd+J3RBxwAb$BOpfV5 z2Rqa;?OSl1R>bKey4kJnXzI5uJ`rEQ zx-W9Me{|p3Z}8u(rZ8Lzj6A`g{NPA>#wb| zJKL9@J#pj5$DZFg_VFWUet&oClbz!q9eVrR@oU$=x_f!gdwZ{*zjylXRqi|T?}N?z wKYe!K+8c+y`Q@2czBu{m>wjf+5mPTYFux9!ir+YG$;AFu+QQ~&?~ literal 0 HcmV?d00001 diff --git a/images/skyway10.gif b/images/skyway10.gif new file mode 100644 index 0000000000000000000000000000000000000000..6e05b176c84aea213586a6122ce2d9ab76451e16 GIT binary patch literal 936 zcmX9-&#M(=5Ius#TLlrchzCt2kz#Io;3G>8C8p>~tq_7nXdML6CV~@TkVH{Lt%7;A z5CtPhky?!z5kZiPpjA*C|AL4@n9fJv;&PcgbAHX-XOAD#SI7lFg6mnLh2niY#P(%qeXrPG}dN2kfMwkghf&m340uhW*#Dsaspn?;LNJc7h zLgr^kp@~8iqZBpKh-S2+C#-ZBqZre`DlN!-rZJ+2{hLc%PvkJcBvZ_x?8#+O!vc#e zv4#yc*_cW&xm8?|dlu&XcMx82Du}W1_jcQh_ddi!3c;=sJuieR+9Mgdg zcBo_8x8OLfh|`HqcB*q)XmQEZbfJq~>Y8qJvs>NMz9uiko@Ul5fy)rqG5KzMBEEoi zU*vMhwIuJu(L337bmFqEW!^q*$%-x1noMtWgL>Yr{`TNMyRqK>^|AgF*f@_}8=J?z zsvB=_+`Di8k2^az-`V}Z;UkaUI`{pB%>z$Ax&7h8M=#v>)GKFxd-ad+K6+$VzPR_E zJtsan@c7+F-aYlj$+xzi`SZ^9>5D&o`q&%q-#L5h<)1&k>w|}`eY3T5>LOqG;k|#i xZvS%m@Ri^9-2d9`=Pti=^Y!yjT-|&6>*H^J{@1tHE(0@CAmz)3q literal 0 HcmV?d00001 diff --git a/images/skyway11.gif b/images/skyway11.gif new file mode 100644 index 0000000000000000000000000000000000000000..a1dc2284747f67bbf3bc66e48b61b9065f7a5404 GIT binary patch literal 937 zcmX9-O{*4U5Iv!b>mLXr$;nbK(IQl`53*B>!dys3yMl=%NNXc4+I0vLtZ37xfiy~l za3%Ws0aGNxjk^1G5p7xpE~3?V9(oopFZ0fvubKDh<4-+w^rgKB{EPn|0RiI*f(Ri7 zu92X?K>|snkh2;^NYJ2wB1))115LEhgE1H}!b}(v3@9)Wh+u>wCd@+y6`V*!GE$Kf zGCxBKO%$RSrKpKUG@}(gVWqQjS)TU-(2E)B8LeknPLuQPcDlZ7FcA7 zHEgiS7JF#-1{iTBZQavQVlt4y3}s9@4?|MP$wVeIl{qQrWGba53t7xk)?_1_*~*@D zq82sEaYk5*R-pC+$6@C-WQteMRjQh5RI^&uQ{KG8GyhC`?M}|*m=1KX zLmkt;1;=ScoKAGIQ=QX7i%X`a3tj9|*L0(s-Rhq9HF+WSG_y_#T!yfY$#>%u@dd2= zB9}|9C3zo?-pQ_`6PI-@^Y&>=R&1fxWO}0;)bnojx4Zw_jrHzdAL~DXjq|u|V|QP! zAK%`!=dL54J@Chq=XdSf|Nh3emw&o&`+;-cZ2l8B-n;YhQ$KHhclyS=2Tz`P;f_Q1 z{POX>$3A#%&!L0QT)gkqGjF_k^T2PPAAalidoP~b{PoJ-clN)2^@lHaE*<~k*pclI xPd`@=Z~gtz)#tZ%zJB7_Q!hU9$+Z(#Uitp3>)Q|hwX=2h&+SVmK7E;Z^cL8hn27)Y literal 0 HcmV?d00001 diff --git a/images/skyway12.gif b/images/skyway12.gif new file mode 100644 index 0000000000000000000000000000000000000000..a55c0b16b78ca295d77a8c61cf031ea12db7ffb3 GIT binary patch literal 932 zcmX9-J?M~i5PtY8_<=(p1i^o}vcNt-nvxuPDAE2EXf4s?B|;KS*3cwRLj)4xP?1A$ znSD?Q3jLw+1Zk_Fs3973tg)bIx}G22@bYr+-8~<7@A0i;haY=+6M=tmCkO}_XAndP zF>sCq1r8EOB88k)C_;h;1r$+24H{^og&vHD5hKimM}h$bCIS(RP{f3B$e@A~iAY8& zaze&uNTG>B6r&V1(THZWq9@FB7^4`&z${J3c!u#rH~X7YTp@CpV3H~3P}bzMs9}Lc zmRQ3En{2U%R__5L&ZMQg8%j(DGMJ%^N&DfERB|$r$xLNV%03xNsmVeXvy?U2$Y!>( zC+(<7jdJV}7NcdT^}u#mxrJHJqPd8=4u@Qe_U+E!?mNAE>WRl+*+SrN{Qn3D7*`NP z2r+Pt1O*NfNFs%t)hI%O1_cyRLJb;dqJ_6W9mXieG_XnwGM{OT=wbin64w(sOfbn5b0~XqS=6w= zB1^1cgH5*BL%TP?h%;&Ho`w>WfedCSW72sTl1fe{GMTB&NjWD|DK%NhVwSQd8`;cO z_M{WFs8NnH!cw#XwI4VRJGU|WSu&SU_rWwq^nm+Z(t4wUiYlo_4K>wLkGv%tb?;1h zMRw^%Oa&@fp^7Q*&DK55sYE3!RXHV;9Enk<3RSF9)l{RJ)vBKI<{h5-XWDCbawf-g zpo1OinD#9=PAlScqLZEKoEBPKGBsW3Vwbw68{O+JPyUA*h?iR1fk9z1jDo`+w4fB(5(c=_%}-`#lft^2>ZvVG{|w{Kj@ z(^v02|K-0o{`mFT4^rthozj)yJ{hhsgUpw*Q v?VW>@mtOt$s}HW7`~3VzKW=>T=kH&C`qJ*x4;_8%vs>2=|8VutCZ75a0JD|e literal 0 HcmV?d00001 diff --git a/images/skyway14.gif b/images/skyway14.gif new file mode 100644 index 0000000000000000000000000000000000000000..b220be5e95ebd3ae8ed183fb80de52600babcd89 GIT binary patch literal 918 zcmX9-y~`DJ6n=y#vqkbH6nx>hpQUCJYG%6qpD^FhUU%<{^U$P9!23smKYL zpCN@N3Q>$w)I=ki(Tbk1(qW8ZOarU5AoH2Vh#vNDE^$4P!vvE|F^94zmqiT=EV9HJ zHrQl~J+ylRj5w3F?rA778OUIUGA5meA*tkKB9ocQoRo7il~R+1EM_TdvXRYfWluU$ ziyGxPBP>NLQ2T-7uyY%;pCxk%bstP)L=U*nC9O9qsHl=^)KF6`^~hVYQTNW2S7euN z#8jYy6{?u>-fZ2|oJv%(Qk7Fe$&na!s!+u$RZTUjS*_|RZ{FdVf2O^5Cued@2RhiH zj%nY5%9l|9sB&B_~@Jc+i!jQV*lkouD@~g;@{WbIr8Av_Q|ilIQZG)hqt#jw?Dq|>66oU z4{d(GxAW`n=DYV^yZ`5nN4tOhaO&!-KYp;ad;ad`{M*M5ZCyG2{hP19`{d^X&(7XI X^V4tt?%a8L?w1SKZf@T?5%};WUtfws literal 0 HcmV?d00001 diff --git a/images/skyway15.gif b/images/skyway15.gif new file mode 100644 index 0000000000000000000000000000000000000000..7841fde9d26f8f61dfa56d288d3b72063b61af73 GIT binary patch literal 917 zcmX9-zv~rr6g@(i)ba&2R1&UBEiNsZICvoOp^)^ACZ}t|7XyXJDUdiIf>wh#D1^aX zq7ZCpYP%F6g5XepLV{x;Qcbt>q0jJm+;{K!b?@7pJ@fAIi*F+EH~xPF1dJ;PB7_*Y zMuGwd2_%t1&T14PL4yK{D4_-oG|@s2#$dz{4?#fJ2{hMI?%xm zbxivf9H$j=I?>5abxsQ{E}5Dxbg@fa(~WL+t9#nl5Xns&%4#%j{N%y);qdB)_($fKEo~?*nE1w zukYFW+R;mY#d|ll4!`mBKU*LFcJuYOFZ^-yog=?~b@=!fmk)gS=c7COHg`_n`rz5Q zy9YPF+&}x%&gR~+S06mN_504#Z%%!(``Z)ycDCDV&x8vTqYlmKZ_xOkR WKi_%z^Zw`OfBfj`mk$qa;pBf9n2bpP literal 0 HcmV?d00001 diff --git a/images/skyway16.gif b/images/skyway16.gif new file mode 100644 index 0000000000000000000000000000000000000000..101a1e321472774ccf129a790111efad717df13b GIT binary patch literal 938 zcmX9-J;;z{6g`o_H>s#JMO^7~=))m{P-*B0qG=RVLr@LZC0wgnI1nTuPW_PLaOnp{ z68eE4Xt-hVg$2=4qu>}cHB>@e&qL4f^76d*p1*tFlc!D`Ieg{_9>m}H{}2!`2q1_M zV&FRx6gWsAi4<~Hp$G{Y6i`G7HE5uT7J4uSBSx4BLxKSXCIS(RP{f3J$e@A~iAY8& zazf^3NTG>B6r&V1(THZWq9?3$7^4`|z$z`se5Ns?oBhpKTu0( zC!MH8jdGk3mZBA?{lIb9xsBP+lDUMs4yG}p8(ilrturd9sFG^bP*W}S$WyXW*Upqj zWS1_)RG@+ts+jWJY~9_QN>s8^l~Y2=kr;KVP{k@$O*N`nt?DUH-r<>lrag8iXL3vj zI@qC(Y43vLv?5L?I@zhtX`#g>Q`3bmcByN+(ammkPkWm@5POW|;m&GWk-dHl+UkA3vRh5H}f^U1Z{A8)_4_wXCX|M_AQ7k55?`TJ{o zHgCTF@X1@BZTxlT=Sv4(f9>0&FKqtu!Ba=??z?;F>`#|>U3~lC)|+Ry-+ShPt#jYJ zd;M5Fd+E7P-`RKPx2uP~I{n}2FaLPy>Wja={O7H&Z@hBj`0eXYZ2f*ae literal 0 HcmV?d00001 diff --git a/images/skyway17.gif b/images/skyway17.gif new file mode 100644 index 0000000000000000000000000000000000000000..6ab2a01996a528d0087a0c363f3ea2852f8ce924 GIT binary patch literal 932 zcmX9-&#O>n5IyM&UImdv5@a-`8zm@ANqU!@;MM%(~fFeq$K?6;+(1S4;F~Uq35)3FX5r|-fA|}j31{Iu0L^4v5 z6EZ(T3QZKE7^SF*Ml_=pJz=H87{!~Fr}IwFS&CYfRmWlz2qH7u~m z5^LCClP&hp?hP>FOxn7;p~Pe$gBi-0bRLGJl9P!{W-4=1&dF3tO%}44rL4(DHnWvI z=|nARl;e!B6so|28acBVWc zyL2I@0u`)K#gyk}>+a@MqLP)WoDxco#Hdq+Dpsj#s!`2qRZn^H4$u5E?Xf#KlVdv2 z!47pydlww16>&Pz$xd}n3oS00nl5y)OI_2AZg#7C+S}xT*wf5fC2$$SS|;y}SHv5z z_KRFDxrXF|$mQGyOwanY6Em^UJT9fIGZcz8T)NfD!yMc9{U61uoVDlXA+uZls z)qMHk%|{QN{`F@4bpDb3hcAEm{Lbx9cOQK3@`Y=6ZhjVfw)Z`tzm8u#u(fmK#^G;n zf4=e7kDqM5u>Y4!&mI5x)}=ST`}vEb_y70j;~%_x>gy99ZNIX8@$SiQA3AsFu?OEg s^V<*4oPGQ3_kZ90{mSXDUfOtK?>nzwd+PemlUpBN`Q!TgyLVyhe==8+rvLx| literal 0 HcmV?d00001 diff --git a/images/skyway18.gif b/images/skyway18.gif new file mode 100644 index 0000000000000000000000000000000000000000..ee1c9dd4b46166ee3ce5f993d45adb4e20b5f013 GIT binary patch literal 1004 zcmX9-O^A?X5PoWn?693GHY%Npa7zQjEJLD)pkER;F$)73my`|?D0|6+O_A0iDoR&b z4^2NP8y&(8f-X))rHBP4L|_LGR)?+;ou=od_we!YelySC%=g$6k8Zes$IT%A!T*Oq z01X3-uzF>IN*c_yhmXW5r{?tNn{`!1r$+%YP7(J4s@F!K|>hY3}!S7vo`UN z#xS-y%xNCxZ6SVIghgAzl9plFRkn01F4iC@rg!=YSuShahxEV4m#;U zZ-zYSIvC9algwZ?3oNpN)s%Yybg4XM4emUg6cQL?x=jTNz;}8iC3W6o;J4nEVWxL#XN?8X>Adb-IdiIuenLjL42c z6r&=lLsODb)pn;wB$p~gry-4Lk=CiX$-27P=}2dKq<01~6p2tf6Pe76%+5jw1-yOJa_4bQ@&dh#)@TQgf z|2loo?BnlEZJNI@z4`JZhpyhSZ|=sE$Il&Gef{rWOfTJW_RvEwpMQO7Zr9Tv+`i}9 zsRyi&oBLPVQJ^Fx7Xiw-|=lrFMavV z-wX4Ln?HNu!~Ji4b>!}?ORuauIJxG?=a;^H^Zk9Bb|2pJ+o^XZf7p5P=*i1x-&nPA l`%@eCKJ(M7>sQ@y%fh{EB`92$A|pCPm&nWXy!0MEKHhKU`J4HsXQm!`_|WaxkALw0 zArL^r03$454c(DofDH$n@PPLy3?c&2NFa#}WTSv0Do~9U7}0@l6C`K|Lz}^jW?|MQ z9?}@bHitRQ!@MoTPm8cDQ#MZwP+xf5+pv+2vN=YrYnvUWYa+> zJ?PDlCtU}lnP8F`%w~Z_R(U7+e$sow7R zcLL+wHy-1kz^3!quxVm%=J~fa-n`?%5BIJ=vAA*Pokw=foxb??wmr}M{QKOqmln70 zJo@L?&wn!W&OJ}Q_U>)(-!-*-_d|;x&wTmY><7CJom+Z!%e@ztCSSZ^<&_6kzT3d# zyXU_-`{{v|nT4tM9{u6kh1G*6{@AuU_v@9DkDWSp^7`e&Kc1R@efjdSmll5d{H8PC zFKvH$;i=QJkH4_+)vbruR^ME^^2X*{?q6Fzx@GH**{7fTA{k{I#iOK1! a-%ft9e(9sF2Ua#8{Oj7qGt)OtVBdeD%C>R< literal 0 HcmV?d00001 diff --git a/images/skyway20.gif b/images/skyway20.gif new file mode 100644 index 0000000000000000000000000000000000000000..858bd0545b8b4e2ef123fd1a3df4a902fe004e94 GIT binary patch literal 982 zcmX9-O{h?15Iv#`g*HMhM9F!kA=<)4nvbv!LFp4k7e(gcH5w#H;SWR*l!M?~^j!Iq zE*>#zi?pSLNJwLlL<&(6M5vG=v}pH;a5bHezQyJ8-I?<@bGJ^tw)us9D?t2<{||ux z8U`3)0c(8)2?p43zzGj{kHR1#5RC+q$Ursz~ zVQh1l(>%=ELj1G{i?)O%EyJ>{U`4C2YLn8Yby$lAQYk^=6O9nntZ%yFI6*cYbkc*~ z40+OZFq#P_nZaxpSY!pODfa^CV7JSZ~ zp7adQ_JS9^!mC}0N>qopGQv(z5LmJZ}ty6Q8b#=4TkE*|BuNVLgU<`IIFomQZODz0d`!ewFHN;_)Jk z^W1ohe*%lIV!`4?8!~SmU%2Gy=g)8W^Oc!}D_6a@cK5~aPdvGP`tD!5_uraXzVeg5 ze>n2R)a6+UoC*JvSZgPIjowJ*!_TRZYZ$Ev$dFwAL>gbn0U)pwh-NwCV z-u?B|%TIlJa@_|9UO)Hdxr1A_e|=@wl|9F19xa={yyNQI8;{<&{@H`y=MKGp>*L95 zU)}r0ChqTCziIVb-}*m)Jes|BaNl=_7u(hK~;sk|e{fsDmhD6IvZ4bB2t?4w)K^l}c=7 z43#ouI!Q`LN-7nn&bsS+?)qat`&s*af7APJGjmg2z5Txc4SsT0f2#kL4d)41%QQsMS#Ts6EFxc0vJ;S5K4}=s%6vPw_C>l~UqG(JZ!Vf8gD1<2nPzL>MvvG7vHdG8nP| zvJkQevKSKg1OOw5F-@$KZh&ZjX$sI3q$xyGm?n7;NQh{NX&TTpq-jLcm_{TgLWO9A zX$H^?q!~mrm}UXZLYhT1i)oT55rq+rNk)LLh#x5N14taiIWb23@MZFak~%s^14@L|?3`7h<3`Q(KEJQ3qEJkEX#3-r7m?0w~E=eK43!cfE zh6W4`85%J(W)NTyiG-kHh5-x%83r*7W>~X35w|a)caUmI5pV zSqiZfX2~v)IEf;NSsJi3WNF0Gm_>j^kS`NqmH{jSSq8BTW?8_pkYy3eVwP+Z83^%& zF@Kc+e+R)lN-f4?B)yM+89k$I5lNwWNV*1jQQ@xwt2kEUc;sTov;f2JYuM7K0l-X8n?>drM>&Z;}Ws_$aqt`bpzMD z`X_=^k8KzV595f3i7uLanI1e<7+-Q{8q|U2h4P2yM;J;Ls(7zld$O`5YWkh*FUx0@ z_Sa$(HG?~3HOKv0cKi?$aDVxst;|g%NzGQ>;2tM4`ri!QAlF_emw=Tzk`Wa{?Z1U9 zLQlV}h^|{C9w#hY(=vMKsX9Iv9dg6J?Y`%D@2|UMB?r6R0>*w1Z_uFZZC7o2m9{DH z!}P+Gm9*hluVko1Qkv}nHp5{k%vy|MUH`oy^2$e4_M5_CaV{s`QLs%Y{1z#L{PHeiN z3=F0Hdy?aItgGMHzu=0D8Sal3S}MBg;iI^4kK~umG2F77OCYN6e59@LggpJOA5h$dL z!j_E58_1mnqU%Q0vidFwnPXixU#LH`I}ZHHS2f!E$tj6;b~>@+G@uJTi)G_ad6gF5 zEy-}IZXW0{wDhU|aJBYbshU~l3Vn%0m%8ANnnfN<4>(51>Q9(hZHSSr7Ujm++`14w zw>~%fI+c_;Qmvg&q^SDWK@KBS<@Sakh{Lvk3r&wFG&E>YtK+l}bkxdC%zw@%M z9JN&O&Q0M&ZMN%_|H^V?zxpomDcGv@t1GF43Y_TR=Dyd|)qK%={e`0E0__$-n-7X{ znspIsHk8JT%S9VSg1%>ajANgq0q;GX7q9!B5e$syB-OsS$B7i)X%OdTKjadc7!lr$ z0*(a?3QnhM^J3QC{5YiD6mZALU81OKEH!_{;&DOngd?Fa^6c)om8X?mCO6Mosmr2% zXoKq-pPZAOcivc+eF|DQyYIZQ?BAPB1h&uK+C*)Ae zOF-_gAL3C@pMP6)mYw+g0mxS@Cp^mkZc={V)`k5!C z=P$L!BhJdLSZjeuQj+n#_CF>2&hZkvC&OdxTRXvK3w@o+*y163Ra~$M)N0z`@3F%w zhDPoE`#)tq>sIPMrPtz?V`t`Zeazp8x^T>}Xl;`IdCk}ij*aoDsR2NiBTGd-$Mpt9yFuebMzx#X62>`RR%LR@wQfq}@2JF?@Hc@;2kU zPlAQDt~@tiw{dBUW>m6Co|M29uEKh$WQQ@MZ#xzhFSb}5=_%xJCOoUTdL1{#sIhQz zG=JIOZJDw0ND+}}Eh z(hcG{rp%P6S-sUcyFkq5Z0T;Ea#QINb1%b(yuN$t7gY{=@LW@7vI1J)$z9UJX66#X zJ?8{_B33uNQJBhTX?i}R!tt1JX(`?$Szf8s9(!KMEI+Rzy8@_wF7KUyd&SQByy2-hY3)^92nLBT7s3^^rk^Zs!Faz248D zqI^A!UKn!A$z7L8LYzvW2vsXkY3EU;DK6}C*e$H_QpX7qf?yQtXRn7sFTk??SC z!^=fhDUOeK-@INk^h@$~YD+WL ze0$(os%o^wa+Tl<|06T7^2SGlo!PfC1tznmwKqDcM)c>s)8OSjn6Ta#@wC_B1~VRt z_n0RN=iHPjyc>|_`}KNub~xya(sQ{eUTyuv0bTvms(!seWrJJ4#zrK(RnaT6QQoE+ zb5!u{yu{YWe!i||+L7ZUA4H#d=lJCnMT}`2zuloW5!iZR`QK748u_Z~lSnI6(YS02 zPq_ALx?8A{Wp3)r{fbvA69;US_HQl?|8$|e%ta}B+no8B>*rKy!9O0%oz9)w#;wy* zs-f$<3dF2WC=?FcrS{gm9~u6c)$CVctL}TSY2(SRw-#@L%M2drKJmM_M%}Ns+4ep6 z>0G3N{r#D8H}mm3Oa2+y6)~N&wD#li#G)7ZIX~E=ysKX#ZuE%M&(!2*m&Kj=_4tF= U&$?A1UyG*Z-tWScfB?|{9~qjmi~s-t literal 0 HcmV?d00001 diff --git a/images/trash1.gif b/images/trash1.gif new file mode 100644 index 0000000000000000000000000000000000000000..120012aa4cf4ec9aa6f0d78ad1a0900c726e5ede GIT binary patch literal 4171 zcmX9|9{N2j4_yzWo$V!DWj;Uh^S*1)kU_XIwGwywB@6Y`5QR>h}X+;2Ze=g8~2n zAOQjZf&v5rgap(biUJe@l%y&Fh5`%%j9e;&D1Z<^65s&fD8M1WNk9NVpn!mYAOT4Y zLjef^Ng~upfFb}QfJ6|0ASi-B1R)U$2SpJSA}EPq0KrfMg9t_LSmF3 z)JPO!D2ZVJ!%z%^7)D}{@`-|i7$h+qU^t555W`7~02qN{1jGmuqa3A3kq{#(kH8Y6 zB||AafU<*9P6?y*EYVydO4R`hhMGt)x$`WcSiQ@prQ5=Uj zPT~Z>2^1$FPLMdYdCEKrpCk!t?UZvAI3NiG5C}>jkU&U+$^vC4#Rw${3=kMfV35E_ z0s;b}OEe)#;DEqU0*3@n5(FR!lpr8MkOY+`Y9W*+l3a=sK$ir8r7%&sp&~*hU@2cH zx}*|aS`xJn%6iJ#rO-iiNjh8-PwAv2QH&{~6ekLvnobR+`l(XtA9q0#EFFWTpQU#K z&`Gc$J2?`Lw^7WFW!9o?WkE(phMA?M25Cg6i-y)c&>Wp4g2t5jZ4Kf3r1zV2jVQX zSW@RvKk^5bE&w!g2mbr2w4o)u=WoqYlamd1hxKi^h+zHH!f>5yUq;<3?U+yQ)+hCMO9vLN z2ux=zw7s(UP*V4pX(cJUAw=Bd-;<@eZLRd&(OlGVBGR`8iWa(HjD z`qWpRgM<3+vCZ|-$>aJ&inLJwF2|q2TKi$1#p)cFVsbnZj7rlrpXa?y-t|;QaPDOq z&z5dQk5mxaN@HBNeLj+cC<5M|j9c6kot4LVBYtJ)&}Pa^2uPY+o)!DFO%H^RN!=^K zpxg9`gtnCfWk&`0-SyKdzhz{iyZCH6mlJu{xNp6Eunp2_awykJ!-suA?F|`S@0z3) znHn-3mO5_qwvbVuFjsnevO(ddnL0nqV|uk+laKD2D{OsxFV5Ze7M}xFnP10`)fmX} z_IY|bWQ2K#42Ri0u--f9om8L{AoSBx5hmU&3l_Bi0gy(5rc5GWk z1o^~vrzowvrLrnU&4&}n*Q?ySV5;9Pr4w8fe63sW#Z9f6dL0fw`I3%NC!`tKPP^qC zwU->;0UbWC)4-WW(NQ0wAK^h(Cscju_azj)`&0;VYRiRF z122?bny@gJq=ttPrn)V*QK7Pw(nSbM9Nt}1+kF$68a&_q6 zBd6^E3e5B97@!N6+j}Mxok#TS|E%Niv+b+i2g|G<>k##Cy=|J#0umK{G$1b`B>1yD z34WQZPA&JR?>a-(jVa7S{ADaQE@$@IO5v*~daic%1fRKAmXty?u5+^1Z*RN%Ec>=L zGlA!nQJ&Ga)mTYzZ#LCq^gtYaKt?M9m$4N4s(60v7%3g#{;SEeJ=}85V(Bx|vcg|%+NZRfJS(aNf><$sV z{$0x-^^~#@xrC0s@4o}NR@Sg(!WcRT7b)T!#8GUD8 zp>4^v$-on}w%YZ`4r1Z++5Z|GHz(KMGggh_ZI9C^e@cIl z+SRuDEY4H!`Wy1D=|g>8%jNKrmEo~w52w90n6}<(*($6I>^edltgo+ZR`Lx$WC&+6 zleY=nPsOqJsm7Q;yLZB~_PR=gtDT%4#_BkBEP!vMwR&`MxUBWN@`YK8r=ydWEhYAb zYhr9dbDB%-N+Y7Cw`f1xS2}5s`CDRRXy4vvX+K;26g)S97X1HHL@&y|-Dx zSO|2!)XjFke!-=2uD>&!kliWQ7sxB9`s^`l8R~iF{=WC^?D+TeHL*LS8RE(r!@L#G zMbAwh7nJTQ_7{d*o&-AHfsZo<1}j~-&)S=Do;QN8M|UD%d?6d$8e zRnGfg-I6s@(^-4{?FsBk_w9+mqQVqOXD8O<8wDLrg*#Q=bgMLqx&$I!&CTD}J_?i@ zPR}_KcfoMgyHh3XXmx9qk7iQA78OPQIrhqzTy3+EY)$i#C%SGA#}{nXowQucc&T!= zF@3=%)_Vi`LzAKeo>v$#Ujp45Gctv}ljUPil6AGTUTkgm{>3e_^01$CI3|_qw%eg| zUya$o`o}h_cGcB9p=)$Cy0h7P{X2CEul3povn*UcHm!u7#=NsfW|FmDJD_jn=)#R@ zkA>r-+sviUG-#7+)*h>rW6d6syu zzl0v1?HDOHx?a-sT+HLx*<)cAO!ak&9nIe1*`dX4MW3quPR7pVKxFb}@aMz^51v5L ze^UJh{o2m`S(-HCf;I7u2Hs;IS;y|ax)c1lFeBqb@$Tyr#)*rzCaH;QvG!|&NX+0C z>kApre3_xDi6g}qKGb}&cpFsH+hRD(Xbg{AQE8UM@7}+>Nydt~e%k|MPuC-LpYH!F z5%T@Q>Rt1Xk0k8~J*oC^>U>e!#hwq%(l?$QAItW(U7_)a^J5X*kM6V#+IYwQxAF>`1QL(Ce4f075}yO zz$z$+Kx7ST7jFG}bN2hzpRD)y+~arM`kJe=?W2~%^SfEUUHHqIwq4?)cm6qh1B-*h z?^kR)*#GM(;p|E!=L1E$mS(4STuS8^;0s)YB}Z$GUojQ`Oy=||-su;~?5E?31xYL} z*XFGh)?k2VIw7mNpiXze9WU;`dGJ9G@4V+>FfNdFH83eVnjerj3z^4n zyJuMGTt(m?GBjh7BZu@JwB`S9&pA!KCeF2N1$qL_DB-^#p9m9Gce?z1qOG_^DNhg9 z@)Czo$Qg`>DlP$Z&h_iIQ2n#o|<)ahsNn_mjI+5sQklB}fBgUY-LPE^wAY&jR#en+Ch#AL8 z8tu)`b+Q^^g9Lmy*JSVgn~HRFpHgETi4eR$(HO97clzK;p?< z^EP#yMiU5-#`akH(3;EEro3Qv1%6&FEpyaJuzy9`#ny}hzULj?tYs;VbEg8Dr!^24 z>C^#a+tn~;S^gB4QH?VKk#ybdtSPnZpMF6!3-N zbq7nuEI*Q~)hHdVB?}x13ahzAyF{!n)2Y0yWei#Q*~}AGS;^PLEc1d4D?86NS(A^4 z9S4_5*0t;Ri`BT}A&0H`%d+IZncDmzO22o9xsjvTHJu{X%dp{y4yuM#w`!L0=+zjr z$B&_#$S;r7a{5@fzfF%3oj5ms^0QwuSA04xB{q2D@8{oWh>j_5J-0-$>+;lbc}Ffdz)3+cvOiiGdZn^ zwX`Y?j(j>?cYslSL%;fMcKjaGi=h&duQ!)}cvTz!c0xgC1I_q;CK#J@61XqoNQ2 zC|N0}SSd*DfG_}1(EPqF1qJYrQBYD*)6mk!rRB!&p#mW)$6eEh&OK|KgPu;Bqsg! zDLFGMJ0~~qOMXFlMP*fWO>JHM_qO(q&aUpB-l5@<(XsJg6PWph#iivH?CRS3?%w{v zA^zz2dyHIsxi$ufJg(_OXQc+k!fV$WbTA^`_i%;@*;>ePA94}gU>vo!^^uW3~yE6|q;=jb=s+S`?}mPN?)24ZRNBA}-hT zXN~2@6S!5(zQjMm1y6>&^Z2YR5<{!2w5(s!+}7zP4RsjJ+#fS3TcVaU6&3boo*IL` zNz${?f^Md^ILcD~Vmc~EHVx=mh+Auj8)A&}krG+NW=BD5u=qX9&=-{V0n)cdPBJrc zQ8_eHGM(~YUNW&};a8Mq?O?S3RzR>NO)9}R*`e3+*q#6FZH`-B9EhVgCC~LOO(K`! zO)ORttwtSVE{(-Jg)JXm2Fw#0_;qR%@918YS;kD%%e!@Nodl#`A_3pJp~v+njj#B_^O8(n zufxE>{CBtd3px$lyXOn1TAWIo<_C($i9;pAM2_uPWfJg~=buemP^S{Z2q^AvE_f=q zJ|S}f3_@%Ulev&N@^3D%O>ZTAan6AqCUjJv;r6qxr35;zOXUP=x9sv8Hr$6L#?j17 zPm)Rbkf~DOu{(dv$r*^7$UbnIsIEZ*ULel{7qe_xl_gYtL-JB}*x#jsul=kz)DfXI zpo7;0<=U=&mk)B(sEt!&EK8V)_yKOzoP*|LD8v;1DyB$Q-1M_)tb0Ur+Y@ORnPuJuK5pThRI zJ3Qg>?^~o2H7GVgxyD8Y#uI{ZDR$f{YGRHf@AdHGtcI+VccxT7%7-$;TwNg?qX#Mu z+=?YTe{d_wit@zVT5V^s4tC|{Fe&5}SC%y@=6h@Kxqd4qoP~FT^+&XHpY+4%wdF5U z=~&)Qn9JS5RlYN(tGO)>wWhM2ergE<@7n<8yu2z;Gcne;PfR5M?1@ETc;_RRej^Xm zC(O{O&1w^iE^m&%W~WE8Mo#{ib6XqS8{$;UUE`_riI;xW0J!WY2z$J78eczs;0Lw; zDD#0H|IsQ#Vt6JW%?I@GJQ!j-T#wRJ|B&4rd=w-NKC2VSG6Go4`B zLn&j^^!Ufi{Wp>nJPdMDuzBZp64;eA8}He*Ky3_?k6ORI}--v?+uZ zR}zD785mhKZdhK2!QeKEhd*s(t~%Jg*Ajx=z}t|3vy%Z55YitIG9-wOwX-;}o$8G@ zYuW50LI<(f^H)awjtKXcD>aE=384PHyuQJWCu~{fQd>8+E@wtcMZK%n&-TMa`R*ms ze~YUrr2>yn>Tpna&sON|UVXNeoPyQDnU0wd^)IUtT{>6v!#*apQ{i^x$ug-CF=(7H(wG zT?7@4<5mdbKW5Cn#)9_U&gYl>N(^dR#qw8A(;V4#J$T|5T|qK3In(6)P|}9|Z&~7> zY(WF0B@7+wj+qMV|&3F&-Q*n9xFeO&c+Tp&Vm;oNDn<6Y}7&IVH%?u z?HE4M%j{ove@0gvBoRhzB?0vPv3N%mUZ!|CI7{e>QZ*t*6}wX;{6^=FEz4{;0T|`) z>$-qFUnT)BgJ*{^jd~5N(va(>#_lq>Nt=PRUeCC;$2po;7beZC(Q7vNa`nKx3K9@o zd4^2TG?^d)U6>GPZ}SF-Ooc3>GSP|Pd?r2UV1Zg;69_!V=)c3dwW|fo?weE)gF`z~-6Gx}FgC=w8*(@u$YvinQ#bE*@epB5v@g3~0Dg8HdhU_anp`%XGvdoIl*z=rNFdfyoGNn z9y(`GFoOA^RK5A0l;v4sw94Uisq&w=z}UE1l|t0cN9Qz;&v?tmf$dFeVnB&OgTAYS)7{LWJZLWvSD~-&B?gb>c*-yWZj^GjVqxRwKxA2+wxb*9G z9%ijVO-E|GubGnBvOeyhR7W~5A~oodP~w?;tche^SpJ*k4mE8|;I#8ef?>qLm0~8b zdtW}MWiKl(x^LAU;Bz2CgWBZ^8H$9wP(IsO<+9cJoRp|G>rpWod^V6n{E;)zf*t z+CRMT$`*=3s>XJ}iKy!+zuZ5z#jsBV0og;Qqlz`$Sak?M0=kcaNx;J%=)qI7-4x5s zug8I<7eR0hAv6}f;{B|0*G1XU|8S#t2KC{d)#w>b)&?dfi3Bhl^yAg?-OdJZ`Qss- zpp=J;%4j*4*fVhF&$nu*yK#X>2En!fW^2*~{230ms zk$@A?J}*DARt8DDkUpbXEcRX06QWmy=vP<=pfDAEDXJy1dyCsx72E^6g&<{xZ7x?u z#j+FMvGL(HHv7~syCEmPxcx0))6&)XM?2aDa3VJnN8quieUPbTr(=FT~ z)-aYedf;W5mGBHTVWrWvBe|)$Zb2*a=FGvh4oL{^bYIUzzcZFbZCo|leps@E6RQ4uJDjTtXvvt4-_rU!k_1Cv! z`MZ#rUuH1cg^mH>*bKOayROBfml+7YXU(3_jdFE*SvDCE+E!XV37osOV4?|^) z6K_k0bpt3}2TttcefaU%$U*eBLluE2-pQcG6=&QWt(7y?TW}LVe9J?+tn-pHWDg10 zt}tCKz41{aCgDv%bsS;BgJ4Voh)4+%(A=*B#*OxdB`@6N5Sah#L-JFuZ3r$$d!{bG zrDB=57vgvZ8f;rSF4!@18gkP}mQRyHGUgKZayUH*5Zi5u73BBW%@brJ>JyoSvji4d z5`fa{!nD;HM@p7T4w6e;;BU_kzu@k`s>y#>)Z3KzYO;RAmF&rKwFf9BI(3di5|CSo z+SgZBK7rzk@2ay+o~hm(V26pMPZiON9(`K7$04V`vt}1AD*aKSH?j`8fj9@P2MC_H zk$~%l1lg=DPSIl-93Apv2;kGkTv^Ly2l5l??CSyJhd2nHW@`>v)xRHJLMn~Xl ziw748GQ%C>2V|9S(IfooPCv_X;=Pfkp=v=6SO(-ba(Q~Q{WCMWa7T-u%PWK3kfy6m0i4l0yR?}N#GmtJjJ~Le z*_%wnc#EgaR*xVMJZ`#hN!GK=6s5?Q_1YMY=sVQy>&Iw(`YB}PQsVi+f4>dNa%NS~ zn&mItS67p0#g*bRBrMCNC!CP*qURQ}I3T3v3kh%~XNkP!0O-^D#Kqp}h9`KLs5wX8 z&S#)C6y0$+)@1idhO^H?9Kut;SfQR9?{E0^rVmZXAi%aMmaD^*I=Y`14P6S_WjTMn zg*w3=!V_eB(3nB~ehjSAb| zEUKJ^e7BWHqk4QN;(@boa}OWxTPwe@h}W2~oOYWm!Dd9{Ysooxu21`nFAwJXW#wi_ zCbhvsiV;t^T^qk{sqJ^4(5iA4HS}F~RsQq{jhl@y49vfmV2x&7Nhr1RiQQy-NNgt#5^pHs8Z^qH zTVjw5BT~(5-?}0WQB{7>mc44C6{6t)U#RHE1rcY#_cP4HzVbuA;%=dl*j&U~*CH$h zFC?)KnM|M3!Q1U2?JyK6Bw#=fOUM$A_R_VmE{DsIfZO#q$CG7jaKj_5V+yvLFDZya z!`te(*Qp((6VdCCB5tOXrBF|B&;SDsT%wqje)cM3!u(U;A?NG#f zvo5g{#$jX|pV|uJ_>veoqy%c-ASPu7- zXx#0Nn$v`+>NwcbvYx1TbGlF#1Wp^ZFnO-p3A&S6?X*Zux!%5q_(d3F;v7EQG=x@S z{i>REZ1FK5Owa?replP>ntT_w^`rqm)y(cW%1f7&dA1C5;5%di1$$haZNf+U;axw8 z+^jfpI?>V;Wu#xv+AAsm#gvu4;In}s|>(I5dI-y?T9kl*Kb zvFCIxd&cC6O05ehmLN|<0w9mc;#<1M9N?#hI<|)VZmo}qx|$@Q-GV%O%Gpn+~GGH~j3^Mq;AzEG@z8pp{Z+cJ}`I3>F3MjgDxZdCt zxPLsE^@FBS{mm>D(b|I&)u`Q=(F7OSVj)YMH*paT&e66WoPC%X2{O4{tS?Nsc(e#7 z4i5A!oyR&pKs5Nx56_gZ=Enyll$eV5fiNrieAtM$)GmBZsMy7KKdAQ5@~2~mIk_mW zSaPM0Zh|D#2s;sn8t$vNovA7MboHkkbRQNKLb+@;TX1EX1xo-5b0v4L$#-ctjRa_} znN>!65Jbss+*@~4zzPn!_H271>U>69l>|s(Q=}B8tIl{w8R8dk_50J$$Gt|=KHKGy z`5kF&_rk;*q1rf&wV6d`U9Z=aF-t9OLb6PDdl-EhbF`S~8* aY~#Hv-?K)u6v;B!8#9;r_Z*9gH1Qv0z9U5d literal 0 HcmV?d00001 diff --git a/images/trash2.gif b/images/trash2.gif new file mode 100644 index 0000000000000000000000000000000000000000..0b776232f93acdec8581c0d5515e4eb79b8f8922 GIT binary patch literal 3084 zcmX9-d00(b8(*gq8LE>`G}@?sZNN5l$0bHt|64LzIC2&{js0@to^?4Z+L%ut(~p8#a}-G4Zef_9|!;f00RmD z3IYlN3IlQnA%F-#Oez5l0gV8S#f1n0gaE>T0f2#kL4d)41%QQsMS#TslVK2G1Tdz^ zNB}8-D1a#nP!yynL{XR`I1o}0Q4mu!plC?Zh@vrt2tK3`q7bGSKrxVF5XE4M1r!S@ z7Evsw2vZCxj3`WC0AWc85j+AzCX#0Ija)(TK@eg{14u(iBS>S2h$eE4Ai|IVkb#gv zkin1zkcE&%kj0RwCj&5o7}G>L=>~`fn5F$F--%ShBS?68qpW-(11C8RK-G4Tk98Ho)gdH}J5C?~>*9x+WZQBns8 z44Ft8NFBLC;)4+b5Cai|5Q7m55DO8D5Q`Dn5)n#jF=oh$h)PljFhc=`f((Ti3NvJH zL^|n)n4tkfLxx5SjTrE zFiQcJf-Hqt3bP~@EpVwMIh4OtqoG-eTC5fsxzm}LOVK$bx)gIN}^EM!^4vX~`l zA`2m!FcwD%K(Qbo4im`@i3mx6IA0KoRYLKS$Ucbm#949Z5EM&CV(~;Lkwh31qJ$HH zC)3GL(oags8-GHI1IYP9{1E>WU>XLTX=;K?%&q8Yv-Q32Tsqr$L|$uMj-Vp1IbrUi z9ldud@>`Or)$wX}m(R5x*WFa&-Fms8J=55)Eyu31u;Y|@*l2HSWzoGeFxpoQRuy;V z3y!x*wN&Yu)0E??=&8xM_fOeX?pSiIOK%g&P@JK1;*P2qzw(maHrMSN%I%|Cb$DU= z%Om8PNBc_W4ER(_JezLR!xQ!v^SQG(EWh+eeT1C-tW%c4-l6tFML8+{z9;4^kd`wF z8b7}^Dd{A4_dgk$aa6jW*EjEd?(Q8_QnR$7r}6eiN9&A$$DS`-BAWRc`D**!<*!!- zsBTir-Mg#i=76+=$f@R)-^r=rIBCU)@RU(h?srJl&FE62n(}JPM8|JmqJ8g~ZTZl5 z?Z<`KC>d<97u{E@5!xn8ZNN0{7~%V>}zB*?DTY> z4t;L6jtc)gcb}O@gv80v4gaQF;g-zo8NVd8Q>Hx4);nYK%OmB8xAsRECvt|Uw$}3qiL5rtq8FnZ(A8~EE02@sjE9@=H zo4e0g&sZnV@i}z;vcNZaH1w$IQOuLuoH9`zzMda=trG6s)#G}^R%5KXbMJzT#b-xM zuNR)!Av@>F#-1NpR|YYE$?ndSy@`?!s4Lzo{c}y?d~;h0{{AXB+ny*n)x4`ik|Xgc z$xPIoQN~Tbf9cuW_>Fgk&hPW&#v7JOj1kumydsaT*Bdf(( zyY#L4tmg;T_D5sOG0PV(mJ5a*es}GB`+A=Hq`aKsjm{fd?EB#F+|kV+0$QBU{0?ro z`J01;|DBrmc+l)-qExy2h!^9jVva8Uk_(mQdwwv7D-ykf_e}4i?ajw;w0ydFSZdr8 zEDT-s;+$jbkHCRR$L{La`{a+n-lMX$@4Hva((I8xXXGjDGHp6>-5ANcD0k|Q&yH{! zjjz7?m-YCqW~0bY3G~eT=^@4q>KZnvurA(*eyFytHPB~UzF_V|XY#>_iX`s~`ReaS znyK6Ok4Uv1ep5X6#5$)y*kN)n)_C#EV`Cwj$yL+%J3rs*vvNdN8yjx*KG8I+{@e4{ zRl%G|Ywn8Al3MzW)=Ii*vD|-$qV-kJeeS)Y+;jhp-O!t~HJZxYO?e8D5BA4ROZ?WR z9=7B1$!9K2b0lr zRZdZi_A-OCb^f+7U~{mJoxZXo&^@tWW;#zbeL_9%^uwGvGF#WJcWw=MRH+CQ;# zyT@+-N8AFVrcxNQKyI-I*K{)vxbDgF*c6)7rslV3XPIdIEQ#)zu01+oqClTmkJMs? z0B;!+Y~b>6nS#ThX~Mj#Z>@iN9Jd$@Iq^@ImimGpsW6ciK3+K=VgtoPa;av8p?A zQWdQ6f6MLB=r*NH0)%@`wcJU2Fuy=&nxB)`(ybw8(P!WAJoyTX)6Cs$Jgj8)97^kp z3d*#ped<2y`^__i4*KRC zGz)YeJ6NOr_Nz=3hjj%YSBnnG9QGRhkdgGyyRu^(QFEeQ+wIR~<@a{ipYD*DxcYMLXBZze z)M7NDqx#J^u4TjUDm&$3{fnW#p56l&H=f80{(U*wGNV-efNW8yYg|^lXq)`w+Lm4U zra`M4wmzF5o|pPasBtuBTePCkZEwx?eD2^HU9aqghm@*Zfz`;D|rxCav?|1)~pY44*_u3m1A>rK%O}GpLY0$}4{q^b}5ZjC6KK9)9q`kc_=M{}-Z2p~+I#p$0{vnyRucA;8bcJ8O zVrhf&(nnd9HiOEXeKrO&g#LlO{wr#;@9&@gJU9Ppy&aw?3G@k0UG&FGhkmy%nFT>d zd(|ozXu#VAKVFm-`43O!M|AKNzEuQvzoVWiT@>mBHwNqqMeb;dZ0NwcMnr_fnCiI`8p$pFhs$e4hFJzT5A2#?Hak%+&WAK*3k={{sQQ03ZPZ z00IGm0fYq99fSa40FqQCKp{XefRby47z7vwFcRPZ;1J*#z)3&=KtMoXfFJ=$fk8lG zfFuzL57y?NI1qcce6hlxF!6<%+U>Jgt2o4Y&A~=TN zBtig$fCzyh1c^{eNr;dbLQ*t=NQ2@Db>q})>gBnC+mrL0rk07C(ZA^=4oieM;0qEsFfB*aii zq9{O7h@u#Zk|;*yL{VWVMxr=Cafsp=ijyb-Py(U^h7u%7B}$1RF_fe-0&9xa0;T)_ zDh|pyWsLH(CUZ?FRR<^<3Xy7{>ZmJh?T{D_FdSkyhT$Ye0E~bbfnfxRQB$IfQne(B zQzN2WQiXuT5r88QM=%^AacXXqb*dYZI0|qS;wXlrB#r?bqavYDNgM|_4sjgAaS|s0 zPC%T%aDv3C$y4D`{3Jo+pnyOjfno$o5*Q#b zxF!=L2^p*|nv^;F@)8%{=9kvP3DSgi@L)dJ3HarTVE->P>A~1gssswa3~w0q7*4 z(UtA5;&+qja=Jc!S1Y^Im>Q0J`$4rkXBAg{U-#uz+h(n|&Qx}26+9^5m@Xc8&|0&* zWTVSNzC&B>6XuY|I;&Xol$kD< zwv@p<`mBqyVEg80R?65NjLTAIT=%ED)n;cL+&)tnG{6_*8H7J9Y=g717syfo& znV2Ueds_3bVJ}a7lU8}>oQrRg;745W>)F3I8_wKoZ2xrR^-1nusln$LT3n`6&XW>y z>h`5Bz2!L@qxzW>NZoxY<8|j(ZQcj{w0P@-g0aEJg%@>9I#*dsd`fXN?^aAwRg&M-tGvxH1%oFG7kv)J&$mq zjyxz3yP#puRHM60n7L(|*K)W2%JZ}7I3dp43p;Dh^G^xEBUXEOru`}0EcL(fM0I!0 zi72bW>Fk|9=o0w8mH+e`)v;SW{np)PtHw_J!3(O+`Ne(Xg>Q*g650u=$*?p!OA~MBKCG z{=pcHG`WQgm0%xQE2lH*7qeeaiR+39HFswOWU39c-W+I=+Ps=u@_l)@=wj>4tQ)(E z@GNhd*4E9uRX4Mnd55t)%cSE>>#R03{KIgKtm(VasIKxz@7rqsZn;wN=A|uNr&;K} z1{(tkhW@lSmp?xV)V*KZaj`fR&}`gn!Uw-LF@hdN@0hAi6EItg4skuMw*k+8Vx##7`} z%!JJ52w~}<>E8B72Hh*eZF`fg8KeI1FL#Va2C4vmk-2eGF(3Z-h4)@>DpzI#qSS7T zS(s!WvG=$CK6NO3dFlDo;>jP^%MSc|!sA_a)X8?$dQL*D;*~q9tGr`v-#Tr6?U6iwJO1CG4d-Aez(;Hd>Kv{8nL%dSs7uf zd8_pEw!bsi*E}#GkzgTGy3`|@u>9(8Yoy*XpZPI7hV2b z2G4dGtITVs3MZ!el8YuidUWhZajJ=JzE*)niE>18Yg+h&6DqGXIhHzg z-%c9-o^sFIAhn@8gPl#Qc2kyabzZmswyPFfa|I%nOr@TCh0RiJGNwM zCh{e>Y|cb4s(j@#f052C&b$QQ9vjNHEf&OlJYc==p>TT3%(l=*d7q=ZBsZK1{$Pn| z_JmxDWj@a@yb`gn*(Tu8{(q*_B;%L76_373wHQh45E}B^el4h{@4MTc`|C8q@^1P( zZY-=BD$06X@TZ`twG1xWLT)iZy+}^z({Shlm+}G8&_e-Z0&6K6-@n z^Fu4!RMSeY$NxHSINYwcr=)o&eRBMXN7|@rr=D}6dQ@}Y<6sXK|5B=fe^7LXTX1Oe z!N+rlF5x@6V#%d$gr|!{#T_2;xpu9u;_`QOD~sFGTd4rM(2y*@w##z`&Ik3h#dRH# z1IxH|u)TBUYiE6n4pGrsiGp?8{?sZF^hBR-GI!9yu6)`S@j>M?x3wkTw7uoY@ej5c z(gjsL-vkyqx&>uwVSTHr9l1Ul2PQq1|N3!m_Q`Sg3@a-<{dmTtNtL5vC})J z2fp6Y5bRCZs0C+jI>sb^91Su(I>~a(j!_TKM$@=E<(fNtoP?4*kvFB;Z)m+<3Lj;z z9G&>=!M=qTs^&J^O>N2JT4>1Y3WNaPD{*|Hu}AG=gk zt9zyQz%Rcfl(1bjc@5V5ofWjsm*$GvO!PPHR$GN(8a8`jHSPnKnf&yrT4qS{Mx$EB zt?@^{)f}_YP||O9c)hwUN@!~Izl`Z;x2HaTM2Bx0@2lRWk&w?ehfhXV?GFDUp+;NU?~nVvTZM0XnTsuZ^E^8( z6=1PYa_Z(z4FfMusNix!CMI?uqv3k>I(uNrqzs5+? z6SOB}c0FUMPRRbirM`=4kae+(fpWs0ars?r*B-WT9wr_w8{8W|4`k*D={bUde~mQd z0(QNu=71bnN_eN3w9PQ7RgBfjlpI2nx3VQ$q1IxWn=ehI43?GaZYm;++R*JZKG586Ie!X*n%k&0x8!{6-$;iq=O&1$sz8il%HIXzw7t=C8H%d%Z8H|&eNV|9P z%sn;UKweDmc4lNmoa6*s*JktCqZ^yXu_i29UR%2fNqbCe$U~zqDxS?_%C6R>4b98O z^)aV7nY7ZKQQI74-H!+KF^58oQwf9*;sAE z=v5=7yli2^GmR&+q$bs?>(A)fMsE$UmbLXdH@MloD}Hc5qJ21CeOayvk=oK1*3OCD z;+H6`!_?oflewJQuC;I8B`?|DvX2)KXn#b`c8i-9Qz#=sD<+!$LPFP!<9JuLr>{_i zRbVU*xC19#YqYz3zuJ=cT?p`e6JC`{MD^IFHhFlRP~0WG{A6n*)5_IJ{A<=s+Q8C82W9)g|tAaiN4Iuzt0H#X*K6LHKH`3b90#1 zQcas@wYSn{n667wd3>K@X@-Pbl43(lTW!v{4?#fJ2{hM zI?%xmbxivf9H$j=I?>5abxsQ{E}5Dxbg@fa(~WL+t9#nl5Xns&%4#%?!S2();qL5)_($;)~JKvqZ>*)I@ z{`_m__}(KA9z1*b!&4_tAA0xt-u_Rgj$he*;)j{XNYiIklH literal 0 HcmV?d00001 diff --git a/images/trashcollector0.gif b/images/trashcollector0.gif new file mode 100644 index 0000000000000000000000000000000000000000..53f774b9cd4b4a60e8f0903e17a2b7059043c29f GIT binary patch literal 908 zcmX9-Kd2UT6g`2%Lr^3dp7M~ZQ6xn078M;lC}=u6G!)zhLB|I7Lk5M5po<{#ZjuU) zwlv;CA|-KYY_%=WNt~|dhri+D<9_#^fA@ap&YwMg?At8_-r)TsAYfcU5Fy0CH4+p! zNFa$6a#o`V2^thoL}SbbLfr?`7|{dnb4lxs3M#6k8a32ZOFix*hYF4Xy%A0q1=AUV=-N~68(}50lsAJl< z;5e;_(}_-Ys&iUsammzlp^IJWnr?KnTiw&XCNIREX4WZz%MjKv`EGn7zJPUKAb{C@v8 z&$e#g{O`h@-QV5&_vx<>U+nPO?*D(=e(>bp=8eOjJo@L-^9Lt(PG7xz@yLZ6pWfa3 Ja{oS@dyd{DLL0qnKRFH-Ug0Mir2c)i79331QPE)is^ang(P~D-1QfP>K z`~b|?!EWU+aK&8@DKif1O$vL2qJ_S zxJH5k2MHvRLe6RwAwh!ziYTE54K&e055{1`2s2?wFrdIhAc7H!m@p3+RB$2@$w);` z$ovc`G*O6Rl%ggY(TrB~gq03s6k{4#r3IPKG)DBWe{+fJi5w=FWQsYIJ-IAuSYVMQ z*08}QTkN6T8(_qlv~^EIiOE0)Gn6suJPb)CCli^>ROY0dlc|)NEMzfDS(A-yW-EKr ziCWYs#~EQMT7lXR9EY9TnEfo7OQ`!`8Y6nZeJ*LeQ9(tORHKHPYN-~m z4s}fX796J)aXQh-PIXQTEiRdwE_AU=UDJ(jcB^~Z*W`uR)66<0a2dinCf|)u#22vc zi(D?bmgIdndMCS%PF&Wt%-g3eS+Rv$lj)6aP|v&7-%kF!h4o%vAL~DX&4+klv-8?t z2am3Aj=cQ-&qw+Av)O**(@SsOdb0oO>9fCH`}@@H=UW%{clLg|`}FJ0#S>S*|2W>g zxqbM@Prf~N=E|36Kf3+L(+BsS9q{@~uRK3?=gIBkU;Xmd7vKE(+pY6AE`N9V;r-u# Lxc1_qEu8xgc@2l< literal 0 HcmV?d00001 diff --git a/images/ventgrill.gif b/images/ventgrill.gif new file mode 100644 index 0000000000000000000000000000000000000000..420f9f6e7b168f5225740a519a9c3a9815d7d5ab GIT binary patch literal 923 zcmX9-zpEBx6n-elD>%ee1La1?!l4j?P*PhSvhLMEu%*f21pWa+4vh~qNJ%ubmBWc7 z3I_!tQW{P)gb}tygMWZrnpz^4 zIU(~iq|ihmicyN1Xhbtw(GylWj8TkfV3ihRKGPV{!~V@Bt|xMsV3H~3Q1;}qs9}Lc zmRQ3En{2U%c5i?YXVTU^4J9T68O%_|r1LN&m7GjuGE z?9z>x3RJK{6;s}ut$UhNiAq+ga!M#U5~EHPs#v9}sYW%cRXyd+J3RBxwAb$BOpfV5 z2Rqa;?OSl1R>bKey4kJnXzI5uJ`rEQ zx-W9M9Hq=ZvA=pxo4ljTTcN+Q;r(| literal 0 HcmV?d00001 diff --git a/images/whiteHorizontal.gif b/images/whiteHorizontal.gif new file mode 100644 index 0000000000000000000000000000000000000000..5e1e401e9a550b087672d49fdf64edff8ac61399 GIT binary patch literal 853 zcmX9-y~}h*ccx`Q(J5Z z;+J>GdxTVzIe3c8<=ox*+r3XOzkT%0j~~9chJW$-5D;J#P(%r3~!b28SbTz73t!kIT&yq^6K@DqE<66|R zR<*7uHOnf822mM7;R{U=)0}U);yEJC2AgcLO~q5LMVSK*IpUZLF1g~GaUTGScE@_U zp@zHA#V&QZlSd$_rn}M2ZgsnroI<6Rd(guk^|%+k>{YKjiAI#wPDVJ2PN4CF#1ZE) z7C%Sk5t=%LCWvWBU9NPFHPBEajkVBHE3K6&#b|2n$%x`Ih42)nIHf61<`(Perl&E@ zX-#{CQ6dSdXE4JV&3G2GoYkx+lTUczw>M)?av_Jeu*EHHd9w?NGm7YKY;#-NUSY)} zQ{KT2ceLYO>~dGT-fU9_5>NJ7CGZ%+S*GkwRwNs6_KQ3&d4`mEB>E(KmQFm@bDLScfWse^8%0m2k?n=b^rhX literal 0 HcmV?d00001 diff --git a/images/whiteVertical.gif b/images/whiteVertical.gif new file mode 100644 index 0000000000000000000000000000000000000000..7b43dcd35c461076dd1ffbe97c829185e3828a58 GIT binary patch literal 856 zcmX9-y9!WO5S+robb^hA#Y&nWb|MDS3Av|fB>U_B1$MDcO)p#XrPG}+NV&21Q`Pi zF~S%NEV05G4j5sLYFMKh*P@oSs&z%F zSynkTh{^~GUuc4u=6uT)&k<=h*kp@sDxPvJ${cXW5yxC`$raa(`v6$9JJ!<;HQa?R zcB#vqJOW8I-HmQ`tJ|&Q6e_jcgC6#%$GzxfuX^1{G@`6_GQv@G0*xOejyR98_&G9< z(9|I`K} z5=l@!gBi|f#v<3M(F&@(y;m zqaE*Jm%G~aW}7mQc(TtbfyWTeGG%YFBH4hmU*vJgGo;KT(I?rnbmFnDV?I7(DT*UB znnEA+fTlmCdAs)I0?xT{9_OFH#ar+XSMR=^f1X~veEs2vw}1Zo?9z|FzqCzo=jTxO(sXUmsuo^x*G@AMZaVe)$GMO?E*5 literal 0 HcmV?d00001 diff --git a/images/whitewall.gif b/images/whitewall.gif new file mode 100644 index 0000000000000000000000000000000000000000..3f651f7f57fd0e8a34e49454ede09653398c36e1 GIT binary patch literal 856 zcmX9-y9!WO5S+robb^hA#Y&nWb|MDS3Av|fB>U_B1$MDcO)p#XrPG}+NV&21Q`Pi zF~S%NEV05G4j5sLYFMKh*P@oSs&z%F zSynkTh{^~GUuc4u=6uT)&k<=h*kp@sDxPvJ${cXW5yxC`$raa(`v6$9JJ!<;HQa?R zcB#vqJOW8I-HmQ`tJ|&Q6e_jcgC6#%$GzxfuX^1{G@`6_GQv@G0*xOejyR98_&G9< z(9|I`K} z5=l@!gBi|f#v<3M(F&@(y;m zqaE*Jm%G~aW}7mQc(TtbfyWTeGG%YFBH4hmU*vJgGo;KT(I?rnbmFnDV?I7(DT*UB znnEA+fTlmCdAs)I0?xT{9_OFH#ar+XSMR=^f1X~veEs2vw}1Zo?9z|FzqCzo=jTxO(sXUmsuo^x*G@AMZaVe)$GFF?Kuv literal 0 HcmV?d00001 diff --git a/src/com/droidquest/DQ.java b/src/com/droidquest/DQ.java new file mode 100644 index 0000000..c54eaa8 --- /dev/null +++ b/src/com/droidquest/DQ.java @@ -0,0 +1,315 @@ +package com.droidquest; + +//This is the source code for DroidQuest 2.7. Copyright 2003 by Thomas Foote. + +import java.io.*; +import java.awt.*; +import java.awt.event.*; +import java.awt.image.*; + +import javax.swing.*; + +import com.droidquest.avatars.GameCursor; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Arrow; +import com.droidquest.decorations.Graphix; +import com.droidquest.decorations.Spark; +import com.droidquest.decorations.TextBox; +import com.droidquest.devices.ANDGate; +import com.droidquest.devices.Device; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.NOTGate; +import com.droidquest.devices.Node; +import com.droidquest.devices.ORGate; +import com.droidquest.devices.PortDevice; +import com.droidquest.devices.XORGate; +import com.droidquest.items.Item; +import com.droidquest.items.ToolBox; +import com.droidquest.levels.Level; +import com.droidquest.levels.MainMenu; +import com.droidquest.materials.Material; + +import java.util.Iterator; +import java.util.Set; +import java.util.Vector; +import java.util.Date; +import java.lang.Integer; +import java.util.Random; +import java.applet.*; +import java.net.URL; +import java.net.MalformedURLException; + +public class DQ extends JFrame implements ActionListener +{ + RoomDisplay myRoom; + + public DQ () + { + // Constructor + super("DroidQuest"); + setSize(560+8,384+27+24); + addWindowListener( new WindowAdapter() + { + public void windowClosing(WindowEvent e) + { setVisible(false); dispose(); System.exit(0); } + }); + + setIconImage(new ImageIcon("images/helper0.gif").getImage()); + + Container contentPane = getContentPane(); + myRoom = new RoomDisplay(); + myRoom.dq=this; + + addFocusListener(new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + myRoom.requestFocus(); + } + }); + + contentPane.add(myRoom); + myRoom.setLocation(0,0); + + JMenuBar menuBar; + JMenu fileMenu; + JMenuItem menuItemSave; + JMenuItem menuItemMain; + JCheckBoxMenuItem menuItemSound; + JMenuItem menuItemExit; + + menuBar = new JMenuBar(); + setJMenuBar(menuBar); + fileMenu = new JMenu("File"); + fileMenu.setMnemonic(KeyEvent.VK_F); + menuBar.add(fileMenu); + + menuItemSave = new JMenuItem("Save Level",KeyEvent.VK_S); + menuItemMain = new JMenuItem("Main Menu", KeyEvent.VK_M); + menuItemSound = new JCheckBoxMenuItem("Sound", true); + menuItemExit = new JMenuItem("Exit", KeyEvent.VK_X); + fileMenu.add(menuItemSave); + fileMenu.add(menuItemMain); + fileMenu.add(menuItemSound); + fileMenu.add(menuItemExit); + + menuItemSave.addActionListener(this); + menuItemMain.addActionListener(this); + menuItemSound.addActionListener(this); + menuItemExit.addActionListener(this); + + try + { + System.setErr(System.out); + } + catch (SecurityException e) {} + } + + public static void main(String[] args) + { + DQ dq = new DQ(); + GraphicsConfiguration gc = dq.getGraphicsConfiguration(); + Rectangle bounds = gc.getBounds(); + dq.setLocation(bounds.x + (bounds.width - 568)/2, + bounds.y + (bounds.height - 435)/2 ); + dq.setVisible(true); + + } + + public void actionPerformed(ActionEvent e) + { + if (e.getActionCommand() == "Save Level") + { + FileDialog fd = new FileDialog(this,"Save Level", FileDialog.SAVE); + fd.setDirectory("ROlevels"); + fd.show(); + System.out.println("Dialog returned with " + + fd.getDirectory() + + fd.getFile()); + if (fd.getFile() != null) + myRoom.SaveLevel(fd.getDirectory()+fd.getFile()); + } + + if (e.getActionCommand() == "Main Menu") + { + int n = JOptionPane.showConfirmDialog(this,"Do you want to quit this level?", + "return to Main Menu", JOptionPane.YES_NO_OPTION); + if (n==0) + { + myRoom.level.Empty(); + myRoom.level = new MainMenu(myRoom); + myRoom.level.Init(); + } + } + + if (e.getActionCommand() == "Sound") + { + myRoom.useSounds = ((JCheckBoxMenuItem)e.getSource()).getState(); + if (myRoom.useSounds==false) + { + Set keys = myRoom.level.sounds.keySet(); + Iterator iterator = keys.iterator(); + while (iterator.hasNext()) { + String soundFile = iterator.next(); + SoundClip soundClip = myRoom.level.sounds.get(soundFile); + soundClip.audioClip.stop(); + } +// for (int a=0; a= textBox.textString.lastIndexOf(" ")) + {indexTo = textBox.textString.length();} + else + {indexTo = textBox.textString.indexOf(" ",indexFrom+1);} + nextWord = textBox.textString.substring(indexFrom, indexTo); + if (nextWord.startsWith(" ")) + { + nextWord = nextWord.substring(1,nextWord.length()); + } + if (!nextWord.endsWith(" ")) + { + nextWord = nextWord + " "; + } + + if (nextWord.startsWith("{BIG}")) + { + g.setFont(rd.bigFont); + } + + else if (nextWord.startsWith("{SML}")) + { + g.setFont(rd.smallFont); + } + + else if (nextWord.startsWith("{BSP}")) + { + FontMetrics fm = g.getFontMetrics(); + advX = fm.stringWidth(" "); + cursX-=advX; + } + + // if (nextWord fits "{rrr,ggg,bbb} " + else if (nextWord.startsWith("{") + && nextWord.endsWith("} ") + && nextWord.length()==14) + { + // extract rrr,ggg,bbb + Integer rr = new Integer(nextWord.substring(1,4)); + Integer gg = new Integer(nextWord.substring(5,8)); + Integer bb = new Integer(nextWord.substring(9,12)); + g.setColor(new Color(rr.intValue(), + gg.intValue(), + bb.intValue())); + } + else + { + FontMetrics fm = g.getFontMetrics(); + if (fm.getAscent() > advY) + {advY = fm.getAscent() ;} + advX = fm.stringWidth(nextWord); + if (cursX+advX > textBox.width + textBox.x) + { + cursX=textBox.x; + cursY+=advY; + advY=fm.getAscent(); + } + g.drawString(nextWord, cursX, cursY); + cursX+=advX; + if (cursX+advX > textBox.width + textBox.x) + { + cursX=textBox.x; + cursY+=advY; + advY=fm.getAscent(); + } + } + indexFrom = indexTo; + } + while (indexFrom < textBox.textString.length()); + } + } + +public void DrawGraphix(Graphics g, RoomDisplay rd) + { + for (int a = 0; a< graphix.size(); a++) + { + Graphix grx = (Graphix) graphix.elementAt(a); + grx.Draw(g,rd); + } + } + +public void DrawArrows(Graphics g) + { + for (int a = 0; a< arrows.size(); a++) + ((Arrow) arrows.elementAt(a)).Draw(g); + } + +public Room getUpRoom(Item item) + { + return upRoom; + } + +public Room getDownRoom(Item item) + { + return downRoom; + } + +public Room getLeftRoom(Item item) + { + return leftRoom; + } + +public Room getRightRoom(Item item) + { + return rightRoom; + } + +public Wire FindWire(int wireIndex) + { + if (wireIndex==-1) return null; + if (wireIndex>=wires.size()) return null; + return (Wire) wires.elementAt(wireIndex); + } + +public Object clone() + { + Object newObject = null; + try + { + newObject = super.clone(); + } + catch (CloneNotSupportedException e) {} + return newObject; + } + +public void Erase() + { + upRoom = null; + downRoom = null; + rightRoom = null; + leftRoom = null; + portalItem = null; + arrows.clear(); + graphix.clear(); + for (int a=0; a< wires.size(); a++) + { + Wire wire = (Wire) wires.elementAt(a); + wire.fromPort = null; + wire.toPort = null; + wire.inPort = null; + wire.outPort = null; + } + wires.clear(); + } + +} diff --git a/src/com/droidquest/RoomDisplay.java b/src/com/droidquest/RoomDisplay.java new file mode 100644 index 0000000..94de385 --- /dev/null +++ b/src/com/droidquest/RoomDisplay.java @@ -0,0 +1,562 @@ +package com.droidquest; + +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import javax.swing.ImageIcon; +import javax.swing.JPanel; +import javax.swing.Timer; + +import com.droidquest.avatars.LabCursor; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Graphix; +import com.droidquest.decorations.Spark; +import com.droidquest.devices.Device; +import com.droidquest.items.Item; +import com.droidquest.levels.Level; +import com.droidquest.levels.MainMenu; +import com.droidquest.materials.Material; + +public class RoomDisplay extends JPanel +{ + public DQ dq; + Level level; + public Timer timer; + int timerspeed=128; + public boolean useSounds = true; + AffineTransform at = new AffineTransform(); + + public Font bigFont; + public Font smallFont; + private int repeating=0; // Used for repeating keys + + //public boolean isFocusTraversable() + // { + // Necessary to get the keyboard focus to work with + // the ScrenDisplay class. + // return(true); + // } + + public boolean isFocusable() + { + // Necessary to get the keyboard focus to work with + // the ScrenDisplay class. + return(true); + } + + public RoomDisplay() + { + setSize(new Dimension(560,384)); + level = new MainMenu(this); + level.Init(); + smallFont = new Font("Courier",Font.BOLD, 20); + bigFont = new Font("Courier",Font.BOLD, 45); + // setFocusable(true); + requestFocus(); + + // Resizing Fuctions + addComponentListener(new ComponentAdapter() { + public void componentResized(ComponentEvent e) + { + Dimension d = new Dimension(); + getSize(d); + double w = d.width / 560.0; + double h = d.height / 384.0; + at.setToScale(w,h); + } + }); + + // Key Released Functions + addKeyListener(new KeyAdapter() { + public void keyReleased(KeyEvent e) { + // Event Handler for KeyReleased here + if (level.player.KeyUp(e)) + repaint(); + + if (e.getKeyCode() == e.VK_Q) + { + if (timerspeed>1) + timerspeed /= 2; + timer.setDelay(timerspeed); + } + + if (e.getKeyCode() == e.VK_W) + { + if (timerspeed<128) + timerspeed*=2; + if ( (timerspeed>=128) && (level.player instanceof LabCursor) ) + timerspeed*=2; + timer.setDelay(timerspeed); + } + + } + }); + + // Key Pressed Functions + addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent e) { + if (level.player.KeyDown(e)) + repaint(); + return; + } + }); + + // Mouse Functions + addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + int newX = (int) (e.getX() / at.getScaleX()); + int newY = (int) (e.getY() / at.getScaleY()); + int deltaX = newX - e.getX(); + int deltaY = newY - e.getY(); + e.translatePoint(deltaX,deltaY); + level.player.MouseClick(e); + } + }); + + timer = new Timer(timerspeed, new ActionListener() { + public void actionPerformed(ActionEvent e) + { + if (level.portal != null) + { + String filename = level.portal.levelName; + boolean bringStuff = level.portal.bringStuff; + boolean initLevel = level.portal.initLevel; + int x = level.player.x + level.player.getWidth()/2; + int y = level.player.y + level.player.getHeight()/2; + Graphics g = getGraphics(); + level.PlaySound(level.currentViewer.room,Level.TELEPORTSOUND); + boolean tempsound = level.roomdisplay.useSounds; + level.roomdisplay.useSounds = false; + // for (int a=0; a<560; a+=2) + // { + // int c = 255*a/560; + // g.setColor(new Color(c,255-c,0)); + // g.drawRect(x-a-1,y-a-1,a*2+2,a*2+2); + // g.setColor(Color.black); + // g.drawRect(x-a,y-a,a*2,a*2); + // long timeout = System.currentTimeMillis() + 1; + // do {} while (System.currentTimeMillis() < timeout); + // } + // g.setColor(Color.black); + // for (int a=0; a<560; a++) + // { + // g.drawRect(x-a,y-a,a*2,a*2); + // long timeout = System.currentTimeMillis() + 1; + // do {} while (System.currentTimeMillis() < timeout); + // } + if (bringStuff) + { + System.out.println("Saving carried items."); + level.WriteInventory(); + } + + FileInputStream f; + try + { + f = new FileInputStream(filename); + try {f.close();} catch (IOException ie){} + } + catch(FileNotFoundException ie) + { + // filename does not exist + RoomDisplay rd = level.roomdisplay; + String classname = "com.droidquest.levels."+filename.substring(0,filename.length()-4); + Constructor constructor = null; + try + { + Class newlevel = Class.forName(classname); + Class[] arglist = {Class.forName("com.droidquest.RoomDisplay")}; + constructor = newlevel.getConstructor(arglist); + constructor.setAccessible(true); + } + catch (ClassNotFoundException ce) { + ce.printStackTrace(); + } + catch (NoSuchMethodException ne) { + ne.printStackTrace(); + }; + try + { + Object[] args = {rd}; + level = (Level) constructor.newInstance(args); + rd.SaveLevel(); + } + catch(InstantiationException ie2) + { + System.out.println("Instantiation"); + System.exit(0); + } + catch(IllegalAccessException ie2) + { + System.out.println("Illegal Access"); + System.exit(0); + } + catch(IllegalArgumentException ie2) + { + System.out.println("Illegal Argument"); + System.exit(0); + } + catch(InvocationTargetException ie2) + { + System.out.println("Invocation Target"); + Throwable t = ie2.getTargetException(); + ie2.printStackTrace(); + System.out.println(t.getClass()); + System.exit(0); + }; + } + // { + // look for a class that matches the name "filename" without the ".lvl" + // if found, create it and save it, then load the file. + // } + + System.out.println("Loading level " + filename); + LoadLevel(filename); + if (initLevel) + { + System.out.println("Initializing Level"); + level.Init(); + } + if (bringStuff) + { + System.out.println("Loading carried items."); + level.LoadInventory(); + } + x = level.player.x + level.player.getWidth()/2; + y = level.player.y + level.player.getHeight()/2; + + // for (int a=560; a>0; a-=2) + // { + // int c = 255*a/560; + // g.setColor(new Color(255-c,c,0)); + // g.drawRect(x-a-1,y-a-1,a*2+2,a*2+2); + // g.setColor(Color.black); + // g.drawRect(x-a,y-a,a*2,a*2); + // long timeout = System.currentTimeMillis() + 1; + // do {} while (System.currentTimeMillis() < timeout); + // } + // g.setColor(Color.black); + // for (int a=560; a>0; a--) + // { + // g.drawRect(x-a,y-a,a*2,a*2); + // long timeout = System.currentTimeMillis() + 1; + // do {} while (System.currentTimeMillis() < timeout); + // } + level.roomdisplay.useSounds = tempsound; + level.PlaySound(level.currentViewer.room,Level.TRANSPORTSOUND); + } + Electricity(); + for (int a = 0; a < level.items.size(); a++) + { + Item item = (Item) level.items.elementAt(a); + item.Animate(); + if (item.room == level.currentViewer.room) + item.Decorate(); + } + for (int a=0; a6) + { + level.sparks.removeElement(spark); + a--; + } + } + } + }); + + Image tempImage= new BufferedImage(200,200,BufferedImage.TYPE_4BYTE_ABGR); + Graphics g = tempImage.getGraphics(); + Image tempIcon; + ImageIcon tempImageIcon; + + for (int a = 0; a= level.gameCursor.x + && device.ports[b].x+device.x <= level.gameCursor.x + level.gameCursor.getWidth() + && device.ports[b].y+device.y >= level.gameCursor.y + && device.ports[b].y+device.y <= level.gameCursor.y + level.gameCursor.getHeight()) + if (((LabCursor)level.gameCursor).hot) + device.ports[b].value = true; + } + } + } + } + + for (int a=0; a= level.gameCursor.x + && device.ports[b].x+device.x <= level.gameCursor.x + level.gameCursor.getWidth() + && device.ports[b].y+device.y >= level.gameCursor.y + && device.ports[b].y+device.y <= level.gameCursor.y + level.gameCursor.getHeight()) + if (((LabCursor)level.gameCursor).hot) + device.ports[b].value = true; + } + } + if (device.isNode()) + { + if (device.Function()) + nodeChanged=true; + + } + } + } + counter++; + } + while (nodeChanged && counter<1000); + + } + + public void SaveLevel() + { + String temp = level.getClass().toString(); + System.out.println("Class name is " + temp); + String[] path = temp.split("\\."); + for (int a=0; a< path.length; a++) + System.out.println(a + " = " + path[a]); + // String filename = temp.substring(6); + String filename = path[path.length-1]; + SaveLevel(filename+".lvl"); + } + + public void SaveLevel(String filename) + { + System.out.println("Saving level " + filename); + try + { + FileOutputStream out = new FileOutputStream(filename); + ObjectOutputStream s = new ObjectOutputStream(out); + level.writeObject(s); + s.flush(); + s.close(); + out.close(); + } + catch (FileNotFoundException e) + { + System.out.println("File Not Found"); + } + catch (IOException e) + { + System.out.println("IO Exception"); + System.out.println(e.getMessage()); + } + } + + public void LoadLevel(String filename) + { + timer.stop(); + level.Empty(); + level = new Level(this); + Item.level = level; + Room.level = level; + Material.level = level; + + // Add flags for loading Object inventories or running Init() + try + { + FileInputStream in = new FileInputStream(filename); + ObjectInputStream s = new ObjectInputStream(in); + level.readObject(s); + s.close(); + in.close(); + } + catch (FileNotFoundException e) + { + System.out.println("File Not Found"); + return; + } + catch (IOException e) + { + System.out.println("IO Exception"); + System.out.println(e.getMessage()); + e.printStackTrace(); + return; + } + + if (level.remote != null) + { + if (level.electricity) + { + level.remote.x = 28; + level.remote.y = -20; + level.remote.carriedBy = level.player; + level.remote.room = level.player.room; + } + else // Electricity is off + { + level.remote.carriedBy = null; + level.remote.room = null; + } + } + + timer.start(); + } + +} diff --git a/src/com/droidquest/SoundClip.java b/src/com/droidquest/SoundClip.java new file mode 100644 index 0000000..9fe9be6 --- /dev/null +++ b/src/com/droidquest/SoundClip.java @@ -0,0 +1,28 @@ +package com.droidquest; + +import java.applet.Applet; +import java.applet.AudioClip; +import java.net.MalformedURLException; +import java.net.URL; + +public class SoundClip +{ +public AudioClip audioClip; +public String filename; + +public SoundClip(String f) + { + filename = f; + try + { + URL baseURL = new URL("file:" + System.getProperty("user.dir") + "/sounds/"); + URL soundURL; + soundURL = new URL(baseURL, filename); + audioClip = Applet.newAudioClip(soundURL); + } + catch (MalformedURLException e) + { + System.err.println(e.getMessage()); + } + } +} diff --git a/src/com/droidquest/Wire.java b/src/com/droidquest/Wire.java new file mode 100644 index 0000000..e2f3dc9 --- /dev/null +++ b/src/com/droidquest/Wire.java @@ -0,0 +1,439 @@ +package com.droidquest; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; + +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.Device; +import com.droidquest.levels.Level; + +public class Wire implements Serializable +{ +public transient Port fromPort; // Connected First +public transient Port toPort; // Connected 2nd +public transient Port inPort; // Connected to Input +public transient Port outPort; // Connected to Output (Source of Value) +public boolean value; + +public Wire() {} + +public Wire(Port f, Port t) + { + if (f.myDevice!=null) + { + if (f.myDevice.room!=null) + { + if (f.myDevice.room.wires==null) + System.out.println("f.myDevice.room.wires is null"); + } + else + System.out.println("f.myDevice.room is null"); + } + else + System.out.println("f.myDevice is null"); + + f.myDevice.room.wires.addElement(this); + f.myDevice.level.PlaySound(f.myDevice.room, Level.ATTACHSOUND); + + if (f.type == Port.TYPE_INPUT) + { + if (t.type == Port.TYPE_INPUT) + { + Remove(); + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + fromPort = f; + toPort=t; + f.myWire = this; + t.myWire = this; + inPort = fromPort; + outPort = toPort; + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + fromPort = f; + toPort=t; + f.myWire = this; + t.myWire = this; + inPort = fromPort; + outPort = toPort; + t.type = Port.TYPE_OUTPUT; + return; + } + } + if (f.type == Port.TYPE_OUTPUT) + { + if (t.type == Port.TYPE_INPUT) + { + fromPort = f; + toPort=t; + f.myWire = this; + t.myWire = this; + outPort = fromPort; + inPort = toPort; + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + Remove(); + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + fromPort = f; + toPort=t; + f.myWire = this; + t.myWire = this; + outPort = fromPort; + inPort = toPort; + t.type = Port.TYPE_INPUT; + return; + } + } + if (f.type == Port.TYPE_UNDEFINED) + { + if (t.type == Port.TYPE_INPUT) + { + fromPort = f; + toPort=t; + f.myWire = this; + t.myWire = this; + outPort = fromPort; + inPort = toPort; + f.type = Port.TYPE_OUTPUT; + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + fromPort = f; + toPort=t; + f.myWire = this; + t.myWire = this; + inPort = fromPort; + outPort = toPort; + f.type = Port.TYPE_INPUT; + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + fromPort = f; + toPort=t; + f.myWire = this; + t.myWire = this; + return; + } + } + } + +protected void writeRef(ObjectOutputStream s) throws IOException + { + Level level = fromPort.myDevice.level; + int a; + + s.writeInt(level.items.indexOf(fromPort.myDevice)); // Index of fromport device + a=0; while (((Device)fromPort.myDevice).ports[a] != fromPort) a++; + s.writeInt(a); // Index of fromport (as device.ports[?] + + s.writeInt(level.items.indexOf(toPort.myDevice)); // Index of toPort device + a=0; while (((Device)toPort.myDevice).ports[a] != toPort) a++; + s.writeInt(a); // Index of toPort (as device.ports[?] + + s.writeInt(level.items.indexOf(inPort.myDevice)); // Index of inPort device + a=0; while (((Device)inPort.myDevice).ports[a] != inPort) a++; + s.writeInt(a); // Index of inPort (as device.ports[?] + + s.writeInt(level.items.indexOf(outPort.myDevice)); // Index of outPort device + a=0; while (((Device)outPort.myDevice).ports[a] != outPort) a++; + s.writeInt(a); // Index of outPort (as device.ports[?] + } + +protected void readRef(ObjectInputStream s, Level level) throws IOException + { + Device tempDevice; + tempDevice = (Device) level.FindItem(s.readInt()); + fromPort = tempDevice.ports[s.readInt()]; + tempDevice = (Device) level.FindItem(s.readInt()); + toPort = tempDevice.ports[s.readInt()]; + tempDevice = (Device) level.FindItem(s.readInt()); + inPort = tempDevice.ports[s.readInt()]; + tempDevice = (Device) level.FindItem(s.readInt()); + outPort = tempDevice.ports[s.readInt()]; + } + +public void ConnectTo(Port t) + { + fromPort.myDevice.level.PlaySound(fromPort.myDevice.room, Level.DETATCHSOUND); + + if (toPort.myDevice == toPort.myDevice.level.solderingPen) + { + toPort.value = false; + toPort.type = Port.TYPE_UNDEFINED; + toPort.myWire = null; + + if (fromPort.type == Port.TYPE_INPUT) + { + if (t.type == Port.TYPE_INPUT) + { + Remove(); + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + toPort=t; + t.myWire = this; + inPort = fromPort; + outPort = toPort; + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + toPort=t; + t.myWire = this; + inPort = fromPort; + outPort = toPort; + t.type = Port.TYPE_OUTPUT; + return; + } + } + if (fromPort.type == Port.TYPE_OUTPUT) + { + if (t.type == Port.TYPE_INPUT) + { + toPort=t; + t.myWire = this; + outPort = fromPort; + inPort = toPort; + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + Remove(); + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + toPort=t; + t.myWire = this; + outPort = fromPort; + inPort = toPort; + t.type = Port.TYPE_INPUT; + return; + } + } + if (fromPort.type == Port.TYPE_UNDEFINED) + { + if (t.type == Port.TYPE_INPUT) + { + toPort=t; + t.myWire = this; + outPort = fromPort; + inPort = toPort; + fromPort.type = Port.TYPE_OUTPUT; + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + toPort=t; + t.myWire = this; + inPort = fromPort; + outPort = toPort; + fromPort.type = Port.TYPE_INPUT; + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + toPort=t; + t.myWire = this; + return; + } + } + } + else + { + fromPort.value = false; + fromPort.type = Port.TYPE_UNDEFINED; + fromPort.myWire = null; + + if (toPort.type == Port.TYPE_INPUT) + { + if (t.type == Port.TYPE_INPUT) + { + Remove(); + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + fromPort=t; + t.myWire = this; + inPort = toPort; + outPort = fromPort; + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + fromPort=t; + t.myWire = this; + inPort = toPort; + outPort = fromPort; + t.type = Port.TYPE_OUTPUT; + return; + } + } + if (toPort.type == Port.TYPE_OUTPUT) + { + if (t.type == Port.TYPE_INPUT) + { + fromPort=t; + t.myWire = this; + outPort = toPort; + inPort = fromPort; + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + Remove(); + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + fromPort=t; + t.myWire = this; + outPort = toPort; + inPort = fromPort; + t.type = Port.TYPE_INPUT; + return; + } + } + if (toPort.type == Port.TYPE_UNDEFINED) + { + if (t.type == Port.TYPE_INPUT) + { + fromPort=t; + t.myWire = this; + outPort = toPort; + inPort = fromPort; + toPort.type = Port.TYPE_OUTPUT; + return; + } + if (t.type == Port.TYPE_OUTPUT) + { + fromPort=t; + t.myWire = this; + inPort = toPort; + outPort = fromPort; + toPort.type = Port.TYPE_INPUT; + return; + } + if (t.type == Port.TYPE_UNDEFINED) + { + fromPort=t; + t.myWire = this; + return; + } + } + } + + } + +public void Remove() + { + Room room = fromPort.myDevice.room; + + room.level.PlaySound(room, Level.DETATCHSOUND); + + fromPort.myWire = null; + toPort.myWire = null; + fromPort = null; + toPort = null; + inPort = null; + outPort = null; + room.wires.removeElement(this); + + } + +public void Draw(Graphics g) + { + g.setColor(Color.white); + value = false; + if (fromPort.type == Port.TYPE_OUTPUT && fromPort.value) + { + g.setColor(new Color(255,128,0)); + value = true; + } + if (toPort.type == Port.TYPE_OUTPUT && toPort.value) + { + g.setColor(new Color(255,128,0)); + value = true; + } + + Dimension d1, d2; + int x1, y1, x2, y2; + d1 = fromPort.myDevice.GetXY(); + d2 = toPort.myDevice.GetXY(); + x1 = d1.width + fromPort.x; + y1 = d1.height + fromPort.y; + x2 = d2.width + toPort.x; + y2 = d2.height + toPort.y; + switch((((Device)fromPort.myDevice).rotation + fromPort.rotation)%4) + { + case 0: // Up + x1 += 1; + y1 += 1; + break; + case 1: // Right + x1 -= 2; + y1 += 1; + break; + case 2: // Down + x1 -= 2; + y1 -= 2; + break; + case 3: // Left + x1 += 1; + y1 -= 2; + break; + } + switch((((Device)toPort.myDevice).rotation + toPort.rotation)%4) + { + case 0: // Up + x2 += 1; + y2 += 1; + break; + case 1: // Right + x2 -= 2; + y2 += 1; + break; + case 2: // Down + x2 -= 2; + y2 -= 2; + break; + case 3: // Left + x2 += 1; + y2 -= 2; + break; + } + + g.fillRect(Math.min(x1,x2),y1,Math.abs(x1-x2),2); + g.fillRect(x2,Math.min(y1,y2),2,Math.abs(y1-y2)); + g.fillRect(x1,y1,2,2); + g.fillRect(x2,y2,2,2); + g.fillRect(x2,y1,2,2); + + } + +public Port otherPort(Port p) + { + if (fromPort == p) return toPort; + if (toPort == p) return fromPort; + return null; + } + +} \ No newline at end of file diff --git a/src/com/droidquest/avatars/GameCursor.java b/src/com/droidquest/avatars/GameCursor.java new file mode 100644 index 0000000..8f3661c --- /dev/null +++ b/src/com/droidquest/avatars/GameCursor.java @@ -0,0 +1,773 @@ +package com.droidquest.avatars; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FileDialog; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.devices.Device; +import com.droidquest.devices.GenericChip; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.GenericRobot; +import com.droidquest.items.Item; +import com.droidquest.items.ToolBox; + +public class GameCursor extends Item +{ + private int walk = 0; // 0 or 1, used in animation + public boolean outline; // Draw outline around GameCursor? + + public GameCursor(){} + + public GameCursor(int X, int Y, Room r) + { + x=X; y=Y; + outline=false; + room=r; + width=28; height=32; + GenerateIcons(); + } + + public void GenerateIcons() + { + // Executed once during initialization + icons = new ImageIcon[8]; + icons[0]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + icons[3]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + icons[4]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + icons[5]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + icons[6]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + icons[7]= new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + + // 0 = up, left leg up + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(4,2,20,4); + g.fillRect(12,8,4,2); + g.fillRect(4,10,20,2); + g.fillRect(8,10,12,14); + g.fillRect(0,12,4,8); + g.fillRect(24,12,4,6); + g.fillRect(4,22,8,8); + g.fillRect(16,20,8,12); + g.setColor(Color.black); + g.fillRect(8,18,12,2); + g.fillRect(4,26,8,2); + g.fillRect(16,28,8,2); + + // 1 = up, right leg up + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(4,2,20,4); + g.fillRect(12,8,4,2); + g.fillRect(4,10,20,2); + g.fillRect(8,10,12,14); + g.fillRect(0,12,4,6); + g.fillRect(24,12,4,8); + g.fillRect(4,20,8,12); + g.fillRect(16,22,8,8); + g.setColor(Color.black); + g.fillRect(8,18,12,2); + g.fillRect(4,28,8,2); + g.fillRect(16,26,8,2); + + // 2 = down, left(side) leg up + try + { + g = icons[2].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(4,2,20,4); + g.fillRect(12,8,4,2); + g.fillRect(4,10,20,2); + g.fillRect(8,10,12,14); + g.fillRect(0,12,4,8); + g.fillRect(24,12,4,6); + g.fillRect(4,22,8,8); + g.fillRect(16,20,8,12); + g.setColor(Color.black); + g.fillRect(8,2,4,2); + g.fillRect(16,2,4,2); + g.fillRect(12,4,4,2); + g.fillRect(8,18,12,2); + g.fillRect(4,26,8,2); + g.fillRect(16,28,8,2); + + // 3 = down, right(side) leg up + try + { + g = icons[3].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(4,2,20,4); + g.fillRect(12,8,4,2); + g.fillRect(4,10,20,2); + g.fillRect(8,10,12,14); + g.fillRect(0,12,4,6); + g.fillRect(24,12,4,8); + g.fillRect(4,20,8,12); + g.fillRect(16,22,8,8); + g.setColor(Color.black); + g.fillRect(8,2,4,2); + g.fillRect(16,2,4,2); + g.fillRect(12,4,4,2); + g.fillRect(8,18,12,2); + g.fillRect(4,28,8,2); + g.fillRect(16,26,8,2); + + // 4 = left, Stand + try + { + g = icons[4].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(20,2,4,4); + g.fillRect(4,4,4,2); + g.fillRect(12,8,4,2); + g.fillRect(12,10,8,18); + g.fillRect(8,12,4,12); + g.fillRect(8,30,12,2); + g.setColor(Color.black); + g.fillRect(12,2,4,2); + g.fillRect(8,18,12,2); + g.fillRect(12,28,8,2); + + // 5 = left, walk + try + { + g = icons[5].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(20,2,4,4); + g.fillRect(4,4,4,2); + g.fillRect(12,8,4,2); + g.fillRect(8,10,12,14); + g.fillRect(4,12,20,4); + g.fillRect(0,14,4,4); + g.fillRect(24,14,4,6); + g.fillRect(4,24,8,8); + g.fillRect(16,22,8,10); + g.fillRect(0,30,4,2); + g.setColor(Color.black); + g.fillRect(12,2,4,2); + g.fillRect(16,14,4,2); + g.fillRect(8,18,12,2); + g.fillRect(4,28,8,2); + g.fillRect(16,28,8,2); + + // 6 = right, Stand + try + { + g = icons[6].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(4,2,4,4); + g.fillRect(20,4,4,2); + g.fillRect(12,8,4,2); + g.fillRect(8,10,8,18); + g.fillRect(16,12,4,12); + g.fillRect(8,30,12,2); + g.setColor(Color.black); + g.fillRect(12,2,4,2); + g.fillRect(8,18,12,2); + g.fillRect(8,28,8,2); + + // 7 = right, walk + try + { + g = icons[7].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to GameCursor Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,0,12,8); + g.fillRect(4,2,4,4); + g.fillRect(20,4,4,2); + g.fillRect(12,8,4,2); + g.fillRect(8,10,12,14); + g.fillRect(4,12,20,4); + g.fillRect(0,14,4,6); + g.fillRect(24,14,4,4); + g.fillRect(4,22,8,10); + g.fillRect(16,24,8,8); + g.fillRect(24,30,4,2); + g.setColor(Color.black); + g.fillRect(12,2,4,2); + g.fillRect(8,14,4,2); + g.fillRect(8,18,12,2); + g.fillRect(4,28,8,2); + g.fillRect(16,28,8,2); + currentIcon = icons[6].getImage(); + + } + + public void MoveUp(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.UpEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 320; // 10 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveUp( nudge); + walk = 1-walk; + currentIcon = icons[0+walk].getImage(); + } + + public void MoveDown(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.DownEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 0; // 0 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveDown( nudge); + walk = 1-walk; + currentIcon = icons[2+walk].getImage(); + } + + public void MoveLeft(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.LeftEnterOverlap(this)) + { + int newX = 532; // 19 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveLeft( nudge); + walk = 1-walk; + currentIcon = icons[4+walk].getImage(); + } + + public void MoveRight(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + { + if (item.RightEnterOverlap(this)) + { + int newX = 0; // 0 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + } + super.MoveRight( nudge); + walk = 1-walk; + currentIcon = icons[6+walk].getImage(); + } + + public void Draw(Graphics g, RoomDisplay rd) + { + g.drawImage(currentIcon, x, y, rd); + if (outline) + { + g.setColor(Color.white); + g.drawRect(x,y,28,32); + } + } + + public boolean CanBePickedUp(Item i) + { + if (i.getClass().toString().endsWith("Robot")) + return false; + return true; + } + + public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_L) + { + if (carrying != null) + if (carrying.getClass().toString().endsWith("SmallChip")) + { + FileDialog fd = new FileDialog(level.roomdisplay.dq,"Load Chip", FileDialog.LOAD); + fd.setDirectory("chips"); + fd.show(); + System.out.println("Dialog returned with " + + fd.getDirectory() + + fd.getFile()); + if (fd.getFile() != null) + { + ((SmallChip)carrying).Empty(); + ((SmallChip)carrying).LoadChip(fd.getDirectory()+fd.getFile()); + } + } + } + if (e.getKeyCode() == e.VK_S) + { + if (level.solderingPen == null) return false; + if (carrying != null) + Drops(); + level.solderingPen.x = x; + level.solderingPen.y = y; + level.solderingPen.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.solderingPen; + level.player = level.solderingPen; + if (level.remote != null) + if (level.remote.carriedBy != null) + { + level.remote.carriedBy = level.player; + } + } + if (e.getKeyCode() == e.VK_R) + { + if (level.remote == null) return false; + if (level.remote.carriedBy == null) + { // Summon Remote + level.remote.x = 28; + level.remote.y = -20; + level.remote.carriedBy = level.player; + level.remote.room = level.player.room; + level.electricity = true; + } + else + { // Hide Remote + level.remote.carriedBy = null; + level.remote.room = null; + level.electricity = false; + } + // if (carrying != null) + // Drops(); + // level.remote.x = x; + // level.remote.y = y; + // level.remote.room = room; + // room = null; + // if (level.currentViewer == level.player) + // level.currentViewer=level.remote; + // level.player = level.remote; + } + if (e.getKeyCode() == e.VK_T) + { + if (level.toolbox == null) + { + if (carrying != null) + Drops(); + level.toolbox = new ToolBox(x,y+8,room); + level.items.addElement(level.toolbox); + ((ToolBox)level.toolbox).Toggle(); + PicksUp(level.toolbox); + } + if (level.toolbox.room != room) + { + // Summon Toolbox + if (carrying != null) return false; + if (((ToolBox)level.toolbox).open) ((ToolBox)level.toolbox).Toggle(); + level.toolbox.room = room; + level.toolbox.x = x+28; + level.toolbox.y = y+6; + PicksUp(level.toolbox); + } + else + ((ToolBox)level.toolbox).Toggle(); + } + if (e.getKeyCode() == e.VK_SLASH) + { + if (carrying != null) + if (carrying.getClass().toString().endsWith("Chip")) + { + ((GenericChip)carrying).ShowText(true); + return false; + } + if (level.helpCam == null) return false; + level.player = level.helpCam; + level.currentViewer = level.helpCam; + } + if (e.getKeyCode() == e.VK_RIGHT) + { + if (level.cheatmode) + if (e.isShiftDown()) + SetRoom(room.rightRoom); + if (carriedBy==null) + MoveRight(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_LEFT) + { + if (level.cheatmode) + if (e.isShiftDown()) + SetRoom(room.leftRoom); + if (carriedBy==null) + MoveLeft(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_UP) + { + if (level.cheatmode) + if (e.isShiftDown()) + SetRoom(room.upRoom); + if (carriedBy==null) + MoveUp(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_DOWN) + { + if (level.cheatmode) + if (e.isShiftDown()) + SetRoom(room.downRoom); + if (carriedBy==null) + MoveDown(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_SPACE) + { + { + Item item = level.FindNearestItem(level.gameCursor); + if (item!=null) + if (item.getClass().toString().endsWith("Train")) + { + item.CanBePickedUp(this); + return false; + } + } + + if (carrying != null) + Drops(); + else + { + Item item = level.FindNearestItem(level.gameCursor); + if (item != null) + if (item.CanBePickedUp(level.gameCursor)) + PicksUp(item); + } + outline = false; + return false; + } + if (e.getKeyCode() == e.VK_CLOSE_BRACKET) + { + if (carrying !=null) + if (carrying.isDevice()) + ((Device) carrying).rotate(1); + return false; + } + if (e.getKeyCode() == e.VK_OPEN_BRACKET) + { + if (carrying !=null) + if (carrying.isDevice()) + ((Device) carrying).rotate(-1); + return false; + } + if (e.getKeyCode() == e.VK_E) + { + boolean found=false; + Item item = level.FindNearestItem(this); + if (item!=null) + if (item.InternalRoom!=null) + if (Overlaps(item)) + // if (x>=item.x && y>=item.y + // && x+width <= item.x + item.width + // && y+height <= item.y + item.height) + if (!item.OverWall()) + { + int newX = 280; // 10 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + found=true; + } + } + if (e.getKeyCode() == e.VK_X) + { + if (room.portalItem!=null) + { + Dimension d = room.portalItem.GetXY(); + int newX = d.width + + room.portalItem.getWidth()/2 + - width/2; + int newY = d.height + + room.portalItem.getHeight()/4*2 + - height/2; + x = newX; + y = newY; + SetRoom(room.portalItem.room); + level.currentViewer = level.player; + } + } + if (e.getKeyCode() == e.VK_F) + { + if (carrying != null) + if (carrying instanceof Device) + ((Device)carrying).flip(); + } + if (e.getKeyCode() == e.VK_M) + { + Runtime runtime = Runtime.getRuntime(); + long freemem = runtime.freeMemory(); + long totalmem = runtime.totalMemory(); + System.out.println("Total Memory = "+ totalmem + + ", (" + totalmem/1024 + "K), (" + + totalmem/1024/1024 + "M)"); + System.out.println("Free Memory = "+ freemem + + ", (" + freemem/1024 + "K), (" + + freemem/1024/1024 + "M)"); + } + + return false; + } + + public boolean KeyDown(KeyEvent e) + { + if (e.getKeyCode() == e.VK_RIGHT) + { + repeating++; + if (repeating>5) + { + if (carriedBy==null) + MoveRight(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_LEFT) + { + repeating++; + if (repeating>5) + { + if (carriedBy==null) + MoveLeft(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_UP) + { + repeating++; + if (repeating>5) + { + if (carriedBy==null) + MoveUp(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_DOWN) + { + repeating++; + if (repeating>5) + { + if (carriedBy==null) + MoveDown(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_SPACE) + { + if (level.player == level.gameCursor) + outline = true; + } + return false; + } + + public void Animate() + { + if (automove==1 && room == null) + automove=0; + if (automove==1) + { + int dx = autoX - x; + int dy = autoY - y; + if (dx==0 && dy==0) + { + automove=0; + return; + } + if (dx<-28) dx =-28; + if (dx>28) dx=28; + if (dy<-32) dy=-32; + if (dy>32) dy=32; + walk = 1-walk; + if (dx==0) + { + if (dy<0) + currentIcon = icons[0+walk].getImage(); + else + currentIcon = icons[2+walk].getImage(); + } + else + { + if (dx<0) + currentIcon = icons[4+walk].getImage(); + else + currentIcon = icons[6+walk].getImage(); + } + if (dx>0) MoveRight(dx); + if (dx<0) MoveLeft(-dx); + if (dy>0) MoveDown(dy); + if (dy<0) MoveUp(-dy); + } + if (automove==2) + { + walk = 1-walk; + if (autoX>0) + { + currentIcon = icons[6+walk].getImage(); + MoveRight(autoX); + } + + if (autoX<0) + { + currentIcon = icons[4+walk].getImage(); + MoveLeft(-autoX); + } + + if (autoY>0) + { + currentIcon = icons[2+walk].getImage(); + MoveDown(autoY); + } + + if (autoY<0) + { + currentIcon = icons[0+walk].getImage(); + MoveUp(-autoY); + } + } + } + + public GenericRobot PlayerInRobot(GenericRobot robot) + { + if (robot==null) + { + if (level.player.room.portalItem!=null) + { + if (level.player.room.portalItem.getClass().toString().endsWith("Robot")) + return (PlayerInRobot ((GenericRobot) level.player.room.portalItem)); + else return (null); + } + else + return (null); + } + else + if (robot.room.portalItem != null) + { + if (robot.room.portalItem.getClass().toString().endsWith("Robot")) + return (PlayerInRobot ((GenericRobot) robot.room.portalItem)); + else + return null; + } + else + return robot; + } + +} diff --git a/src/com/droidquest/avatars/HelpCam.java b/src/com/droidquest/avatars/HelpCam.java new file mode 100644 index 0000000..39534fa --- /dev/null +++ b/src/com/droidquest/avatars/HelpCam.java @@ -0,0 +1,45 @@ +package com.droidquest.avatars; + +import java.awt.Graphics; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; +import javax.swing.JPanel; + +import com.droidquest.Room; +import com.droidquest.items.Item; + +public class HelpCam extends Item +{ +public HelpCam(Room r) + { + charge=0; + x=28; y=32; width=0; height=0; room =r; + GenerateIcons(); + currentIcon = icons[0].getImage(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0] = new ImageIcon(new BufferedImage(8,8,BufferedImage.TYPE_4BYTE_ABGR)); + } + +public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_ENTER) + { + level.player = level.gameCursor; + level.currentViewer = level.gameCursor; + } + return false; + } + +public void Draw(Graphics g, JPanel jp) + { + // Draws nothing + } + + +} diff --git a/src/com/droidquest/avatars/LabCursor.java b/src/com/droidquest/avatars/LabCursor.java new file mode 100644 index 0000000..3aee374 --- /dev/null +++ b/src/com/droidquest/avatars/LabCursor.java @@ -0,0 +1,440 @@ +package com.droidquest.avatars; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FileDialog; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.devices.Device; +import com.droidquest.devices.GenericChip; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.Item; +import com.droidquest.items.ToolBox; + +public class LabCursor extends Item +{ +public boolean hot; + +public LabCursor(){} + +public LabCursor(int X, int Y, Room r) + { + x=X; y=Y; + hot=false; + room=r; + width=28; height=32; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[2]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to LabCursor Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + g.setColor(Color.white); + g.fillRect(0,0,width,height); + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to LabCursor Image"); + return; + } + g2 = (Graphics2D) g; + g.setColor(new Color(255,128,0)); + g.fillRect(0,0,width,height); + if (hot) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item i) + { + if (i.getClass().toString().endsWith("Robot")) + return false; + return true; + } + +public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_L) + { + if (carrying != null) + if (carrying.getClass().toString().endsWith("SmallChip")) + { + FileDialog fd = new FileDialog(level.roomdisplay.dq,"Load Chip", FileDialog.LOAD); + fd.setDirectory("chips"); + fd.show(); + System.out.println("Dialog returned with " + + fd.getDirectory() + + fd.getFile()); + if (fd.getFile() != null) + { + ((SmallChip)carrying).Empty(); + ((SmallChip)carrying).LoadChip(fd.getDirectory()+fd.getFile()); + } + } + } + if (e.getKeyCode() == e.VK_H) + { + hot = !hot; + if (hot) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[0].getImage(); + return false; + } + if (e.getKeyCode() == e.VK_S) + { + if (level.solderingPen == null) return false; + if (carrying != null) + if (carrying.getClass().toString().endsWith("SmallChip")) + { + FileDialog fd = new FileDialog(level.roomdisplay.dq,"Save Chip", FileDialog.SAVE); + fd.setDirectory("chips"); + fd.show(); + System.out.println("Dialog returned with " + + fd.getDirectory() + + fd.getFile()); + if (fd.getFile() != null) + ((SmallChip)carrying).SaveChip(fd.getDirectory()+fd.getFile()); + return false; + } + if (carrying != null) + Drops(); + level.solderingPen.x = x; + level.solderingPen.y = y; + level.solderingPen.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.solderingPen; + level.player = level.solderingPen; + if (level.remote != null) + if (level.remote.carriedBy != null) + { + level.remote.carriedBy = level.player; + } + } + if (e.getKeyCode() == e.VK_R) + { + if (level.remote == null) return false; + if (level.remote.carriedBy == null) + { // Summon Remote + level.remote.x = 28; + level.remote.y = -20; + level.remote.carriedBy = level.player; + level.remote.room = level.player.room; + level.electricity = true; + } + else + { // Hide Remote + level.remote.carriedBy = null; + level.remote.room = null; + level.electricity = false; + } +// if (carrying != null) +// Drops(); +// level.remote.x = x; +// level.remote.y = y; +// level.remote.room = room; +// room = null; +// if (level.currentViewer == level.player) +// level.currentViewer=level.remote; +// level.player = level.remote; + } + if (e.getKeyCode() == e.VK_P) + { + if (level.paintbrush == null) return false; + if (carrying != null) + Drops(); + level.paintbrush.x = (x/28)*28; + level.paintbrush.y = (y/32)*32; + level.paintbrush.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.paintbrush; + level.player = level.paintbrush; + } + if (e.getKeyCode() == e.VK_T) + { + if (level.toolbox == null) return false; + if (level.toolbox.room != room) + { + // Summon Toolbox + if (carrying != null) return false; + if (((ToolBox)level.toolbox).open) ((ToolBox)level.toolbox).Toggle(); + level.toolbox.room = room; + level.toolbox.x = x+28; + level.toolbox.y = y+6; + PicksUp(level.toolbox); + } + else + ((ToolBox)level.toolbox).Toggle(); + } + if (e.getKeyCode() == e.VK_SLASH) + { + if (carrying != null) + if (carrying.getClass().toString().endsWith("Chip")) + { + ((GenericChip)carrying).ShowText(true); + return false; + } + if (level.helpCam == null) return false; + level.player = level.helpCam; + level.currentViewer = level.helpCam; + } + if (e.getKeyCode() == e.VK_RIGHT) + { + if (carriedBy==null) + MoveRight(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_LEFT) + { + if (carriedBy==null) + MoveLeft(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_UP) + { + if (carriedBy==null) + MoveUp(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_DOWN) + { + if (carriedBy==null) + MoveDown(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_SPACE) + { + if (carrying != null) + Drops(); + else + { + Item item = level.FindNearestItem(level.gameCursor); + if (item != null) + if (item.CanBePickedUp(level.gameCursor)) + PicksUp(item); + } + return false; + } + if (e.getKeyCode() == e.VK_CLOSE_BRACKET) + { + if (carrying !=null) + if (carrying.isDevice()) + ((Device) carrying).rotate(1); + return false; + } + if (e.getKeyCode() == e.VK_OPEN_BRACKET) + { + if (carrying !=null) + if (carrying.isDevice()) + ((Device) carrying).rotate(-1); + return false; + } + if (e.getKeyCode() == e.VK_E) + { + boolean found=false; + Item item = level.FindNearestItem(this); + if (item!=null) + if (item.InternalRoom!=null) + if (Overlaps(item)) + if (!item.OverWall()) + { + int newX = 280; // 10 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + found=true; + } + } + if (e.getKeyCode() == e.VK_X) + { + if (room.portalItem!=null) + { + Dimension d = room.portalItem.GetXY(); + int newX = d.width + + room.portalItem.getWidth()/2 + - width/2; + int newY = d.height + + room.portalItem.getHeight()/4*2 + - height/2; + x = newX; + y = newY; + SetRoom(room.portalItem.room); + level.currentViewer = level.player; + } + } + if (e.getKeyCode() == e.VK_F) + { + if (carrying != null) + if (carrying instanceof Device) + ((Device)carrying).flip(); + } + if (e.getKeyCode() == e.VK_M) + { + Runtime runtime = Runtime.getRuntime(); + long freemem = runtime.freeMemory(); + long totalmem = runtime.totalMemory(); + System.out.println("Total Memory = "+ totalmem + + ", (" + totalmem/1024 + "K), (" + + totalmem/1024/1024 + "M)"); + System.out.println("Free Memory = "+ freemem + + ", (" + freemem/1024 + "K), (" + + freemem/1024/1024 + "M)"); + } + + return false; + } + +public boolean KeyDown(KeyEvent e) + { + if (e.getKeyCode() == e.VK_RIGHT) + { + repeating++; + if (repeating>10) + { + if (carriedBy==null) + MoveRight(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_LEFT) + { + repeating++; + if (repeating>10) + { + if (carriedBy==null) + MoveLeft(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_UP) + { + repeating++; + if (repeating>10) + { + if (carriedBy==null) + MoveUp(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_DOWN) + { + repeating++; + if (repeating>10) + { + if (carriedBy==null) + MoveDown(e.isControlDown()); + return true; + } + return false; + } + return false; + } + +public void MoveUp(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.UpEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 320; // 10 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveUp( nudge); + } + +public void MoveDown(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.DownEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 0; // 0 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveDown( nudge); + } + +public void MoveLeft(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.LeftEnterOverlap(this)) + { + int newX = 532; // 19 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveLeft( nudge); + } + +public void MoveRight(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + { + if (item.RightEnterOverlap(this)) + { + int newX = 0; // 0 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + } + super.MoveRight( nudge); + } + +} \ No newline at end of file diff --git a/src/com/droidquest/avatars/PaintBrush.java b/src/com/droidquest/avatars/PaintBrush.java new file mode 100644 index 0000000..6f67fd6 --- /dev/null +++ b/src/com/droidquest/avatars/PaintBrush.java @@ -0,0 +1,277 @@ +package com.droidquest.avatars; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.items.GenericRobot; +import com.droidquest.items.Item; +import com.droidquest.materials.Material; +import com.droidquest.materials.RobotBlocker; + +public class PaintBrush extends Item +{ + // The Paintbrush works just like the original, except it allows + // differnt color paints for differnt materials. Pressing 'P' as the + // Paintbrush switches the Material Settings. + // + // Detectable, blocks all Red + // Undetectable, blocks all Green + // Undetectable, blocks Orange Orange + // Undetectable, blocks White White + // Undetectable, blocks Blue Blue + + int emptyIndex=0; + int paintIndex; // Which paintMats[] am I using? + transient Material[] paintMats; + int matIndex; // index of chosen paintMax in level.materials + + public PaintBrush() + { + width=28; height=32; + GenerateIcons(); + } + + public void GenerateIcons() + { + icons = new ImageIcon[5]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[3]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[4]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + for (int a=0; a<5; a++) + { + try + { + g = icons[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to PaintBrush Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + switch(a) + { + case 0: g.setColor(new Color(192,0,0)); + break; + case 1: g.setColor(new Color(0,192,0)); + break; + case 2: g.setColor(new Color(192,96,0)); + break; + case 3: g.setColor(new Color(192,192,192)); + break; + case 4: g.setColor(new Color(0,0,192)); + break; + } + + g2.fillRect(0,0,28,18); + g2.fillRect(4,18,20,2); + g2.fillRect(8,20,12,10); + g2.fillRect(12,30,4,2); + g.setColor(Color.black); + g2.fillRect(0,12,28,2); + g2.fillRect(12,26,4,2); + } + currentIcon=icons[0].getImage(); + + paintMats = new Material[5]; + emptyIndex = 0; + paintMats[0] = Material.FindSimiliar(new Material(Color.red, false, true)); + paintMats[1] = Material.FindSimiliar(new Material(Color.green, false, false)); + Item robot=null; + for (int a=0; a383) + { + if (room.getDownRoom(this) != null) + { // change Rooms + y=y-384; + SetRoom(room.getDownRoom(this)); + } + else // stop at bottom + y=384-32; + } + } + + public void MoveLeft(boolean nudge) + { + int dist = 28; + if (nudge) dist = 2; + x=x-dist; + if (x<0) + { + if (room.getLeftRoom(this) != null) + { // change Rooms + x=x+560; + SetRoom(room.getLeftRoom(this)); + } + else // stop at left + x=0; + } + } + + public void MoveRight(boolean nudge) + { + int dist = 28; + if (nudge) dist = 2; + x=x+dist; + if (x>559) + { + if (room.getRightRoom(this) != null) + { // change Rooms + x=x-560; + SetRoom(room.getRightRoom(this)); + } + else // stop at right + x=560-28; + } + } + + } diff --git a/src/com/droidquest/avatars/Remote.java b/src/com/droidquest/avatars/Remote.java new file mode 100644 index 0000000..17e1ec2 --- /dev/null +++ b/src/com/droidquest/avatars/Remote.java @@ -0,0 +1,311 @@ +package com.droidquest.avatars; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.items.Item; + +public class Remote extends Item +{ +public Remote() + { +// width=28; height=32; + width=4; height=20; + level.electricity = true; + GenerateIcons(); + } + +public void GenerateIcons() + { +// icons = new ImageIcon[2]; +// icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); +// icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + + Graphics g; + Graphics2D g2; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to Remote Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(new Color(0,0,0,0)); + g2.clearRect(0,0,width,height); + g2.setColor(new Color(255,128,0)); + g2.fillRect(2,0,2,20); + g2.fillRect(0,16,4,4); + currentIcon = icons[0].getImage(); + +// try +// { +// g = icons[0].getImage().getGraphics(); +// } +// catch (NullPointerException e) +// { +// System.out.println("Could not get Graphics pointer to Remote Image[0]"); +// return; +// } +// g2 = (Graphics2D) g; +// g2.setBackground(new Color(0,0,0,0)); +// g2.clearRect(0,0,width,height); +// g2.setColor(Color.white); +// g2.fillRect(20,0,4,12); +// g2.fillRect(0,12,28,20); +// g2.setColor(Color.black); +// g2.fillRect(8,14,12,2); +// g2.fillRect(4,18,20,2); +// g2.fillRect(8,22,12,2); +// g2.fillRect(20,26,4,4); + +// try +// { +// g = icons[1].getImage().getGraphics(); +// } +// catch (NullPointerException e) +// { +// System.out.println("Could not get Graphics pointer to Remote Image[1]"); +// return; +// } +// g2 = (Graphics2D) g; +// g2.setBackground(new Color(0,0,0,0)); +// g2.clearRect(0,0,width,height); +// g2.setColor(new Color(255,128,0)); +// g2.fillRect(20,0,4,12); +// g2.fillRect(0,12,28,20); +// g2.setColor(Color.black); +// g2.fillRect(8,14,12,2); +// g2.fillRect(4,18,20,2); +// g2.fillRect(8,22,12,2); +// g2.fillRect(20,26,4,4); + + } + +public void Animate() + { + if (carriedBy != null) + if (carriedBy.room != room) + room = carriedBy.room; + super.Animate(); +// if (level.electricity) +// currentIcon = icons[1].getImage(); +// else +// currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item i) + { +// if (i.getClass().toString().endsWith("Robot")) + return false; +// return true; + } + +public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_S) + { + if (level.solderingPen == null) return false; + level.solderingPen.x = x; + level.solderingPen.y = y; + level.solderingPen.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.solderingPen; + level.player = level.solderingPen; + } + if (e.getKeyCode() == e.VK_C) + { + level.gameCursor.x = x; + level.gameCursor.y = y; + level.gameCursor.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.gameCursor; + level.player = level.gameCursor; + } + if (e.getKeyCode() == e.VK_P) + { + if (level.paintbrush == null) return false; + level.paintbrush.x = x; + level.paintbrush.y = y; + level.paintbrush.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.paintbrush; + level.player = level.paintbrush; + } + if (e.getKeyCode() == e.VK_SLASH) + { + if (level.helpCam == null) return false; + if (level.player != level.helpCam) + { + level.player = level.helpCam; + level.currentViewer = level.helpCam; + } + } + if (e.getKeyCode() == e.VK_RIGHT) + { + if (carriedBy==null) + MoveRight(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_LEFT) + { + if (carriedBy==null) + MoveLeft(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_UP) + { + if (carriedBy==null) + MoveUp(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_DOWN) + { + if (carriedBy==null) + MoveDown(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_SPACE) + { + level.electricity = ! level.electricity; + } + return false; + } + +public boolean KeyDown(KeyEvent e) + { + if (e.getKeyCode() == e.VK_RIGHT) + { + repeating++; + if (repeating>10) + { + MoveRight(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_LEFT) + { + repeating++; + if (repeating>10) + { + MoveLeft(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_UP) + { + repeating++; + if (repeating>10) + { + MoveUp(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_DOWN) + { + repeating++; + if (repeating>10) + { + MoveDown(e.isControlDown()); + return true; + } + return false; + } + return false; + } + +public void MoveUp(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.UpEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 320; // 10 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveUp( nudge); + } + +public void MoveDown(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.DownEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 0; // 0 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveDown( nudge); + } + +public void MoveLeft(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.LeftEnterOverlap(this)) + { + int newX = 532; // 19 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveLeft( nudge); + } + +public void MoveRight(boolean nudge) + { + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + { + if (item.RightEnterOverlap(this)) + { + int newX = 0; // 0 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + } + super.MoveRight( nudge); + } + +} diff --git a/src/com/droidquest/avatars/SolderingPen.java b/src/com/droidquest/avatars/SolderingPen.java new file mode 100644 index 0000000..5b38a12 --- /dev/null +++ b/src/com/droidquest/avatars/SolderingPen.java @@ -0,0 +1,543 @@ +package com.droidquest.avatars; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.Wire; +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.Device; +import com.droidquest.items.Item; + +public class SolderingPen extends Device +{ +boolean hot; +Port currentPort=null; // Port that Soldering pen is currently over + +public SolderingPen() + { + width=22; height=26; + GenerateIcons(); + currentIcon = icons[0].getImage(); + ports = new Port[1]; + ports[0] = new Port(2,20,Port.TYPE_UNDEFINED,0,Port.ROT_DOWN, this); + + } + +public void GenerateIcons() + { + // Executed once during initialization + icons = new ImageIcon[3]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to SolderingPen Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(new Color(0,0,0,0)); + g2.clearRect(0,0,width,height); + g2.setColor(Color.blue); + g2.fillRect(18,0,6,4); + g2.fillRect(10,2,2,4); + g2.fillRect(10,4,10,2); + g2.fillRect(16,6,10,4); + g2.fillRect(10,10,6,4); + g2.fillRect(6,14,6,4); + g2.fillRect(0,18,12,8); + + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to SolderingPen Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(new Color(0,0,0,0)); + g2.clearRect(0,0,width,height); + g2.setColor(Color.blue); + g2.fillRect(18,0,6,4); + g2.fillRect(10,2,2,4); + g2.fillRect(10,4,10,2); + g2.fillRect(16,6,10,4); + g2.fillRect(10,10,6,4); + g2.fillRect(6,14,6,4); + g2.setColor(new Color(255,128,0)); + g2.fillRect(0,18,12,8); + + try + { + g = icons[2].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to SolderingPen Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(new Color(0,0,0,0)); + g2.clearRect(0,0,width,height); + g2.setColor(Color.blue); + g2.fillRect(18,0,6,4); + g2.fillRect(10,2,2,4); + g2.fillRect(10,4,10,2); + g2.fillRect(16,6,10,4); + g2.fillRect(10,10,6,4); + g2.fillRect(6,14,6,4); + g2.setColor(Color.green); + g2.fillRect(0,18,12,8); + + currentIcon = icons[0].getImage(); + } + +public void CheckPort() + { + hot=false; + currentPort=null; +// Item item = level.FindNearestItem(this); + for (int a=0; a x+9) hot = false; + if (device.ports[b].y + device.y < y+18) hot = false; + if (device.ports[b].y + device.y > y+25) hot = false; + if (hot) + { + currentPort = device.ports[b]; + if (device.ports[b].myWire == null) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[2].getImage(); + b = device.ports.length; + a = level.items.size(); + } + else + currentIcon = icons[0].getImage(); + } + } + } + if (hot==false) + currentIcon = icons[0].getImage(); + } + +public void MoveUp(boolean nudge) + { + Room tempRoom = room; + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.UpEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 320; // 10 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveUp( nudge); + if (tempRoom != room && ports[0].myWire != null) + ports[0].myWire.Remove(); +// wiredPort=null; + CheckPort(); + } + +public void MoveDown(boolean nudge) + { + Room tempRoom = room; + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.DownEnterOverlap(this)) + { + int newX = 280; // 10 * 28 + int newY = 0; // 0 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveDown( nudge); + if (tempRoom != room && ports[0].myWire != null) + ports[0].myWire.Remove(); +// wiredPort=null; + CheckPort(); + } + +public void MoveLeft(boolean nudge) + { + Room tempRoom = room; + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + if (item.LeftEnterOverlap(this)) + { + int newX = 532; // 19 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + super.MoveLeft( nudge); + if (tempRoom != room && ports[0].myWire != null) + ports[0].myWire.Remove(); +// wiredPort=null; + CheckPort(); + } + +public void MoveRight(boolean nudge) + { + Room tempRoom = room; + Item item = level.FindNearestItem(this); + if (item != null) + { + if (item.InternalRoom != null) + { + if (item.RightEnterOverlap(this)) + { + int newX = 0; // 0 * 28 + int newY = 176; // 5.5 * 32 + x = newX; + y = newY; + SetRoom(item.InternalRoom); + } + } + } + super.MoveRight( nudge); + if (tempRoom != room && ports[0].myWire != null) + ports[0].myWire.Remove(); +// wiredPort=null; + CheckPort(); + } + +public void Animate() + { + Room tempRoom = room; + super.Animate(); + if (tempRoom != room && ports[0].myWire != null) + ports[0].myWire.Remove(); + CheckPort(); + } + +public void Decorate() + {return;} + +public void WirePort() + { + if (hot) + { + if (ports[0].myWire == null) // If SP is not wired + { + if (currentPort.myWire != null) // If currentPort is wired + { + // Remove Wire from currentPort + currentPort.myWire.Remove(); + ports[0].value = false; + ports[0].type = Port.TYPE_UNDEFINED; + } + else // If currentPort not wired + { + // Create Wire from CurrentPort to Soldering Pen + Wire tempWire = new Wire(currentPort, ports[0]); + } + } + else // if SP is wired + { + if (currentPort.myWire != null) // If currentPort is wired + { + // Remove wire at currentPort + currentPort.myWire.Remove(); + // Remove wire attached to Pen + if (ports[0].myWire != null) + ports[0].myWire.Remove(); + ports[0].value = false; + ports[0].type = Port.TYPE_UNDEFINED; + } + else // If currentPort not wired + { + // Attach Wire to currentPort + ports[0].myWire.ConnectTo(currentPort); + } + } + } + else if (ports[0].myWire != null) // If not hot and SP wired + { + // Remove Wire to Pen + ports[0].myWire.Remove(); + ports[0].value = false; + ports[0].type = Port.TYPE_UNDEFINED; + } + } + +public boolean Function () + { + if (ports[0].myWire == null) + { + ports[0].value = false; + ports[0].type = Port.TYPE_UNDEFINED; + } + return false; + } + +public boolean CanBePickedUp(Item i) + { + if (i.getClass().toString().endsWith("Robot")) + return false; + return true; + } + +public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_C) + { + if (ports[0].myWire != null) + ports[0].myWire.Remove(); + level.gameCursor.x = x; + level.gameCursor.y = y; + level.gameCursor.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.gameCursor; + level.player = level.gameCursor; + if (level.remote != null) + if (level.remote.carriedBy != null) + { + level.remote.carriedBy = level.player; + } + } + if (e.getKeyCode() == e.VK_R) + { + if (level.remote == null) return false; + if (level.remote.carriedBy == null) + { // Summon Remote + level.remote.x = 28; + level.remote.y = -20; + level.remote.carriedBy = level.player; + level.remote.room = level.player.room; + level.electricity = true; + } + else + { // Hide Remote + level.remote.carriedBy = null; + level.remote.room = null; + level.electricity = false; + } +// if (ports[0].myWire != null) +// ports[0].myWire.Remove(); +// level.remote.x = x; +// level.remote.y = y; +// level.remote.room = room; +// room = null; +// if (level.currentViewer == level.player) +// level.currentViewer=level.remote; +// level.player = level.remote; + } + if (e.getKeyCode() == e.VK_P) + { + if (level.paintbrush == null) return false; + if (ports[0].myWire != null) + ports[0].myWire.Remove(); + level.paintbrush.x = x; + level.paintbrush.y = y; + level.paintbrush.room = room; + room = null; + if (level.currentViewer == level.player) + level.currentViewer=level.paintbrush; + level.player = level.paintbrush; + } + if (e.getKeyCode() == e.VK_SLASH) + { + if (level.helpCam == null) return false; + level.player = level.helpCam; + level.currentViewer = level.helpCam; + } + if (e.getKeyCode() == e.VK_RIGHT) + { + if (carriedBy==null) + MoveRight(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_LEFT) + { + if (carriedBy==null) + MoveLeft(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_UP) + { + if (carriedBy==null) + MoveUp(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_DOWN) + { + if (carriedBy==null) + MoveDown(e.isControlDown()); + repeating=0; + return true; + } + if (e.getKeyCode() == e.VK_SPACE) + { + WirePort(); + } + if (e.getKeyCode() == e.VK_F) + { + if (hot) + { + if (ports[0].myWire != null) // If SP is wired + { + // Flip wire attached to SP + Port tempPort = ports[0].myWire.fromPort; + ports[0].myWire.fromPort = ports[0].myWire.toPort; + ports[0].myWire.toPort = tempPort; + } + else if (ports[0].myWire == null) // If SP is not wired + { + // Flip wire attached to CurrentPort + if (currentPort.myWire != null) + { + Port tempPort = currentPort.myWire.fromPort; + currentPort.myWire.fromPort = currentPort.myWire.toPort; + currentPort.myWire.toPort = tempPort; + } + } + } + else + { + if (ports[0].myWire != null) // If SP is wired + { + // Flip wire attached to SP + Port tempPort = ports[0].myWire.fromPort; + ports[0].myWire.fromPort = ports[0].myWire.toPort; + ports[0].myWire.toPort = tempPort; + } + } + } + return false; + } + +public boolean KeyDown(KeyEvent e) + { + if (e.getKeyCode() == e.VK_RIGHT) + { + repeating++; + if (repeating>10) + { + MoveRight(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_LEFT) + { + repeating++; + if (repeating>10) + { + MoveLeft(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_UP) + { + repeating++; + if (repeating>10) + { + MoveUp(e.isControlDown()); + return true; + } + return false; + } + if (e.getKeyCode() == e.VK_DOWN) + { + repeating++; + if (repeating>10) + { + MoveDown(e.isControlDown()); + return true; + } + return false; + } + return false; + } + +public void MouseClick(MouseEvent e) + { + int button=0; + if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) + button = 1; + if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) + button = 3; + + if (button==1) + { + if (e.getClickCount()==1) + { + autoX = e.getX() - 2; + autoY = e.getY() - 20; + automove = 1; + } + else if (e.getClickCount()==2) + { + int dx = e.getX() - 2 - x; + int dy = e.getY() - 20 - y; + if (Math.abs(dx) > Math.abs(dy)) + { + autoY=0; autoX=28; + if (dx<0) autoX=-28; + automove=2; + } + else + { + autoX=0; autoY=32; + if (dy<0) autoY=-32; + automove=2; + } + } + } + + if (button==3) + { + KeyEvent k = new KeyEvent(e.getComponent(), e.getID(), + e.getWhen(), 0, + KeyEvent.VK_SPACE, ' '); + KeyUp(k); + } + + } + +} diff --git a/src/com/droidquest/chipstuff/ChipCompiler.java b/src/com/droidquest/chipstuff/ChipCompiler.java new file mode 100644 index 0000000..e6562d9 --- /dev/null +++ b/src/com/droidquest/chipstuff/ChipCompiler.java @@ -0,0 +1,207 @@ +package com.droidquest.chipstuff; + +import com.droidquest.Wire; +import com.droidquest.devices.Device; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.PrototypeChip; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.Item; + +public class ChipCompiler extends Thread +{ +public static int chipSpeed=1; + +public ChipCompiler(PrototypeChip pc, SmallChip sc) + { + pc.grabbable = false; + sc.grabbable = false; + int a; + + sc.Empty(); + + for (a=0; a=0) + { + Signal sig = (Signal) sc.signals.elementAt(index); + sc.portSignals[a].internalSignal= sig; + } + sc.ports[a].type = pc.ports[a].type; + sc.portSignals[a].type = pc.ports[a].type; + } + + for (a=0; a=0) + portSignals[a].internalSignal = (Signal) mySignals.elementAt(portIndex); + } + for (int a=0; a=0) + gate.portSignals[b].externalSignal = (Signal) mySignals.elementAt(sigIndex); + gate.portSignals[b].type = s.readInt(); + } + gate.readRef(s); + } + } + +public void Function() + { + if (type.equalsIgnoreCase("AND")) + portSignals[2].externalSignal.Set(portSignals[0].externalSignal.Get() + & portSignals[1].externalSignal.Get()); + if (type.equalsIgnoreCase("OR")) + portSignals[2].externalSignal.Set(portSignals[0].externalSignal.Get() + | portSignals[1].externalSignal.Get()); + if (type.equalsIgnoreCase("NOT")) + portSignals[1].externalSignal.Set(!portSignals[0].externalSignal.Get()); + if (type.equalsIgnoreCase("XOR")) + portSignals[2].externalSignal.Set(portSignals[0].externalSignal.Get() + ^ portSignals[1].externalSignal.Get()); + if (type.equalsIgnoreCase("FF")) + { + if (portSignals[0].externalSignal.Get() ^ portSignals[1].externalSignal.Get()) + state = portSignals[0].externalSignal.Get(); + portSignals[2].externalSignal.Set(state); + portSignals[3].externalSignal.Set(!state); + } + if (type.equalsIgnoreCase("NODE")) + { + portSignals[1].externalSignal.Set(portSignals[0].externalSignal.Get()); + portSignals[2].externalSignal.Set(portSignals[0].externalSignal.Get()); + if (portSignals[3].externalSignal!=null) + portSignals[3].externalSignal.Set(portSignals[0].externalSignal.Get()); + } + if (type.equalsIgnoreCase("Chip")) + { + + for (int s=0; s=0) + portSignals[a].internalSignal = (Signal) mySignals.elementAt(sigIndex); + portSignals[a].type = s.readInt(); + } + + int numGates = s.readInt(); + for (int a=0; a=0) + newGate.portSignals[b].externalSignal = (Signal) mySignals.elementAt(sigIndex); + } + if (newGate.type.equalsIgnoreCase("Chip")) + newGate.LoadSubGate(s); + } + speed = s.readInt(); + } + +public void DebugReport(int indent) + { +// String ind = ""; +// for (int a=0; a0); + myDevice = d; + + if (standard) + { + width = 12; height=size; + wireX = x + 6; wireY = y + height - 6; + } + else + { + width = 2; height = 2; + wireX = x; wireY = y; + } + + if (type==TYPE_UNDEFINED) + locked=false; + else + locked=true; + + } + + public void writeRef(ObjectOutputStream s) throws IOException + { + Level level = myDevice.level; + s.writeInt(level.items.indexOf(myDevice)); + if (myDevice.room != null) + s.writeInt(myDevice.room.wires.indexOf(myWire)); + } + + public void readRef(ObjectInputStream s, Level level) throws IOException + { + myDevice = (Item) level.FindItem(s.readInt()); + if (myDevice != null) + if (myDevice.room != null) + myWire = myDevice.room.FindWire(s.readInt()); + } + + public void Draw(Graphics g, int rot) + { + if (value) + g.setColor(new Color(255,128,0)); + else + g.setColor(Color.white); + int relRot = (rotation + rot)%4; + if (standard) + { + switch (type) + { + case TYPE_INPUT: + switch(relRot) + { + case 0: // Up + g.fillRect(x+0,y+4,4,size); + g.fillRect(x-4,y+0,4,4); + g.fillRect(x+4,y+0,4,4); + g.fillRect(x+0,y-2,4,2); + break; + case 1: // Right + g.fillRect(x-size-3,y+0,size,4); + g.fillRect(x-3,y-4,4,4); + g.fillRect(x-3,y+4,4,4); + g.fillRect(x+1,y+0,2,4); + break; + case 2: // Down + g.fillRect(x-3,y-size-3,4,size); + g.fillRect(x-7,y-3,4,4); + g.fillRect(x+1,y-3,4,4); + g.fillRect(x-3,y+1,4,2); + break; + case 3: // Left + g.fillRect(x+4,y-3,size,4); + g.fillRect(x+0,y-7,4,4); + g.fillRect(x+0,y+1,4,4); + g.fillRect(x-2,y-3,2,4); + break; + } + break; + case TYPE_OUTPUT: + switch(relRot) + { + case 0: // Up + g.fillRect(x+0,y+0,4,size); + g.fillRect(x-4,y+2,12,2); + g.fillRect(x-8,y+4,4,2); + g.fillRect(x+8,y+4,4,2); + break; + case 1: // Right + g.fillRect(x-size+1,y+0,size,4); + g.fillRect(x-3,y-4,2,12); + g.fillRect(x-5,y-8,2,4); + g.fillRect(x-5,y+8,2,4); + break; + case 2: // Down + g.fillRect(x-3,y-size,4,size); + g.fillRect(x-7,y-3,12,2); + g.fillRect(x-11,y-5,4,2); + g.fillRect(x+5,y-5,4,2); + break; + case 3: // Left + g.fillRect(x,y-3,size,4); + g.fillRect(x+2,y-7,2,12); + g.fillRect(x+4,y+5,2,4); + g.fillRect(x+4,y-11,2,4); + break; + } + break; + case TYPE_UNDEFINED: + switch(relRot) + { + case 0: // Up + g.fillRect(x-2,y-4,8,12); + g.fillRect(x,y+8,4,size); + g.setColor(Color.black); + g.fillRect(x,y,4,4); + break; + case 1: // Right + g.fillRect(x-7,y-2,12,8); + g.fillRect(x-7-size,y,size,4); + g.setColor(Color.black); + g.fillRect(x-3,y,4,4); + break; + case 2: // Down + g.fillRect(x-5,y-7,8,12); + g.fillRect(x-3,y-7-size,4,size); + g.setColor(Color.black); + g.fillRect(x-3,y-3,4,4); + break; + case 3: // Left + g.fillRect(x-4,y-5,12,8); + g.fillRect(x+8,y-3,size,4); + g.setColor(Color.black); + g.fillRect(x,y-3,4,4); + break; + } + break; + } + } + } + + + } diff --git a/src/com/droidquest/chipstuff/PortSignal.java b/src/com/droidquest/chipstuff/PortSignal.java new file mode 100644 index 0000000..012c0ba --- /dev/null +++ b/src/com/droidquest/chipstuff/PortSignal.java @@ -0,0 +1,12 @@ +package com.droidquest.chipstuff; + + +public class PortSignal +{ +public Signal externalSignal; +public Signal internalSignal; +public int type; + +public PortSignal() {} + +} diff --git a/src/com/droidquest/chipstuff/Signal.java b/src/com/droidquest/chipstuff/Signal.java new file mode 100644 index 0000000..591fe9f --- /dev/null +++ b/src/com/droidquest/chipstuff/Signal.java @@ -0,0 +1,27 @@ +package com.droidquest.chipstuff; + +import java.io.Serializable; + +public class Signal implements Serializable +{ +transient private int index; +private boolean[] value = new boolean[2]; +public boolean working; +public Signal() + { + index=0; + working=true; + } +public void Flip() + { + index = 1-index; + } +public boolean Get() + { + return value[index] && working; + } +public void Set(boolean v) + { + value[1-index] = v && working; + } +} diff --git a/src/com/droidquest/decorations/Arrow.java b/src/com/droidquest/decorations/Arrow.java new file mode 100644 index 0000000..bfa797b --- /dev/null +++ b/src/com/droidquest/decorations/Arrow.java @@ -0,0 +1,57 @@ +package com.droidquest.decorations; + +import java.awt.Color; +import java.awt.Graphics; +import java.io.Serializable; + +public class Arrow implements Serializable +{ +public static int DIR_UP = 0; +public static int DIR_RIGHT = 1; +public static int DIR_DOWN = 2; +public static int DIR_LEFT = 3; +public int direction; +public int length; +public int x; +public int y; +public Color color; + +public Arrow() {} + +public Arrow(int X, int Y, int dir, int len, Color c) + { + x=X; y=Y; + direction = dir; + length = len; + color = c; + } + +public void Draw(Graphics g) + { + g.setColor(color); + switch(direction) + { + case 0: + g.drawLine(x,y,x-8,y+8); + g.drawLine(x,y,x+8,y+8); + g.drawLine(x,y,x,y+length); + break; + case 1: + g.drawLine(x,y,x-8,y-8); + g.drawLine(x,y,x-8,y+8); + g.drawLine(x,y,x-length,y); + break; + case 2: + g.drawLine(x,y,x-8,y-8); + g.drawLine(x,y,x+8,y-8); + g.drawLine(x,y,x,y-length); + break; + case 3: + g.drawLine(x,y,x+8,y-8); + g.drawLine(x,y,x+8,y+8); + g.drawLine(x,y,x+length,y); + break; + } + } + +} diff --git a/src/com/droidquest/decorations/Graphix.java b/src/com/droidquest/decorations/Graphix.java new file mode 100644 index 0000000..f12d686 --- /dev/null +++ b/src/com/droidquest/decorations/Graphix.java @@ -0,0 +1,132 @@ +package com.droidquest.decorations; + +import java.awt.Graphics; +import java.io.Serializable; + +import javax.swing.ImageIcon; + +import com.droidquest.RoomDisplay; + +public class Graphix implements Serializable +{ +public String[] filenames; +transient protected ImageIcon[] icons; // Array of images for this item +transient ImageIcon icon; +int animationState; +public int x; // Current position +int y; +int behavior; // Overall behavior (SIT, CYCLE, BOUNCE) +int current=1; // Current behavior; 1=move forward, -1=move backward +int dx, dy; // Direction of "forward" +public int count; +int length; // Number of times the Graphix moves forward +public static int SIT=0; +public static int CYCLE=1; +public static int BOUNCE=2; + +public Graphix() {} + +public Graphix(int X, int Y) + { + x=X; y=Y; + GenerateIcons(); + } + +public Graphix(String file, int X, int Y) + { + filenames = new String[1]; + filenames[0] = new String(file); + behavior = SIT; + x=X; y=Y; + GenerateIcons(); + } + +public Graphix(String[] files, int X, int Y) + { + x=X; y=Y; + filenames = files; + behavior = SIT; + GenerateIcons(); + } + +public Graphix(String file, int X, int Y, int b, int DX, int DY, int L) + { + filenames = new String[1]; + filenames[0] = new String(file); + x=X; y=Y; + behavior = b; + dx=DX; dy=DY; + length = L; + GenerateIcons(); + } + +public Graphix(String[] files, int X, int Y, int b, int DX, int DY, int L) + { + filenames = files; + x=X; y=Y; + behavior = b; + dx=DX; dy=DY; + length = L; + GenerateIcons(); + } + +public void GenerateIcons() + { + int numfiles = filenames.length; + icons = new ImageIcon[numfiles]; + for (int a=0; a< numfiles; a++) + icons[a] = new ImageIcon("images/"+ filenames[a]); + icon = icons[0]; + } + +public void Draw(Graphics g, RoomDisplay rd) + { + if (icon != null) + g.drawImage(icon.getImage(), x, y, rd); + } + +public void Animate() + { + int numfiles = filenames.length; + animationState++; + if (animationState==numfiles) + animationState=0; + icon = icons[animationState]; + if (behavior==CYCLE) + { + if (count==length) + { + x-=dx*length; + y-=dy*length; + count=0; + } + else + { + x+=dx; y+=dy; + count++; + } + } + if (behavior==BOUNCE) + if (current==1) + { + if (count==length) + current=-1; + else + { + x+=dx; y+=dy; + count++; + } + } + else + { + if (count==0) + current=1; + else + { + x-=dx; y-=dy; + count--; + } + } + } + +} \ No newline at end of file diff --git a/src/com/droidquest/decorations/Spark.java b/src/com/droidquest/decorations/Spark.java new file mode 100644 index 0000000..b3a99c6 --- /dev/null +++ b/src/com/droidquest/decorations/Spark.java @@ -0,0 +1,44 @@ +package com.droidquest.decorations; + +import java.awt.Color; +import java.awt.Graphics; +import java.io.Serializable; + +import com.droidquest.Room; + +public class Spark implements Serializable +{ + public int x,y; + public int dx,dy; + public int age; + public Room room; + + public Spark() {} + + public Spark(int X, int Y, int Dx, int Dy, Room r) + { + x=X; y=Y; + dx = Dx; dy= Dy; + room = r; + age=0; + } + + public void Age() + { + x += dx; y+= dy; + if (x<0 || x>560 || y<0 || y>384) room=null; + age++; + } + + public void Draw(Graphics g) + { + if (age<2) + g.setColor(Color.white); + else if (age>=2 && age<4) + g.setColor(Color.yellow); + else + g.setColor(Color.red); + g.fillRect(x,y,2,2); + } + +} diff --git a/src/com/droidquest/decorations/TextBox.java b/src/com/droidquest/decorations/TextBox.java new file mode 100644 index 0000000..19befb7 --- /dev/null +++ b/src/com/droidquest/decorations/TextBox.java @@ -0,0 +1,27 @@ +package com.droidquest.decorations; + +import java.io.Serializable; + +public class TextBox implements Serializable +{ +public String textString; +public int x; // Position +public int y; +public int width; // Size + +public TextBox() {} + +public TextBox(String t, int X, int Y, int W) + { + textString = t; + x=X; y=Y; width=W; + } + +public TextBox(String t, int X, int Y) + { + textString = t; + x=X; y=Y; + width=500; + } + +} \ No newline at end of file diff --git a/src/com/droidquest/devices/ANDGate.java b/src/com/droidquest/devices/ANDGate.java new file mode 100644 index 0000000..8018174 --- /dev/null +++ b/src/com/droidquest/devices/ANDGate.java @@ -0,0 +1,181 @@ +package com.droidquest.devices; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.Wire; +import com.droidquest.chipstuff.Port; +import com.droidquest.items.ToolBox; + +public class ANDGate extends Device +{ +transient ImageIcon images[]; + +public ANDGate(int X, int Y, Room r) + { + x=X; y=Y; room =r; + width=28; height=50; + GenerateIcons(); + currentIcon = icons[rotation%2].getImage(); + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to ANDGate Image"); + return; + } + + } + +public void Decorate() + { + super.Decorate(); + if (ports[0].value && ports[1].value) + g.drawImage(images[4+rotation].getImage(), 0, 0, level); + else + g.drawImage(images[rotation].getImage(), 0, 0, level); + } + +public void GenerateIcons() + { + super.GenerateIcons(); + if (ports==null) + { + ports = new Port[3]; + ports[0] = new Port(7,47,Port.TYPE_INPUT,12,Port.ROT_DOWN,this); + ports[1] = new Port(23,43,Port.TYPE_INPUT,8,Port.ROT_DOWN,this); + ports[2] = new Port(12,2,Port.TYPE_OUTPUT,16,Port.ROT_UP,this); + if (rotation > 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r0) + g.setColor(new Color(255,128,0)); + else + g.setColor(color); + g.fillRect(18,0,14,6); + g.fillRect(22,6,6,16); + g.fillRect(8,22,32,2); + if (ports[0].value && level.electricity) + level.PlaySound(room, level.BEEPSOUND); + } + } + +public boolean Function() + { + if (robot!=null) + { + if (radio<0) + radio=0; + + if (radio>0) + { + robot.antenna = true; + ports[1].value = true; + } + else + { + robot.antenna = false; + ports[1].value = false; + } + if (oldRadio != ports[0].value) + { + if (ports[0].value == true) + { + robot.broadcasting = true; + radio++; + } + else + { + robot.broadcasting = false; + radio--; + } + } + oldRadio = ports[0].value; + } + else + { + if (radio2<0) + radio2=0; + + if (radio2>0) + ports[1].value = true; + else + ports[1].value = false; + if (oldRadio != ports[0].value) + { + if (ports[0].value == true) + radio2++; + else + radio2--; + } + oldRadio = ports[0].value; + } + return false; + } + +public void SetRoom(Room r) + { + if (oldRadio) + { + if (robot!=null) + radio--; + else + radio2--; + } + super.SetRoom(r); + robot=null; + if (room.portalItem!=null) + if (room.portalItem.getClass().toString().endsWith("Robot")) + robot = (GenericRobot) room.portalItem; + } + +public void Erase() + { + super.Erase(); + robot = null; + } + +} \ No newline at end of file diff --git a/src/com/droidquest/devices/Bumper.java b/src/com/droidquest/devices/Bumper.java new file mode 100644 index 0000000..a6c2611 --- /dev/null +++ b/src/com/droidquest/devices/Bumper.java @@ -0,0 +1,241 @@ +package com.droidquest.devices; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import javax.swing.ImageIcon; + +import com.droidquest.items.GenericRobot; +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; + +public class Bumper extends Device +{ +int rotation; +Color color; +transient GenericRobot robot; + +public Bumper(int X, int Y , Room r, int direction, Color col) + { + x=X; y=Y; + room = r; + if (room.portalItem!=null) + if (room.portalItem.getClass().toString().endsWith("Robot")) + robot = (GenericRobot) room.portalItem; + rotation = direction; + color = col; + grabbable = false; + GenerateIcons(); + } + +public void writeRef(ObjectOutputStream s) throws IOException + { + super.writeRef(s); + s.writeInt(level.items.indexOf(robot)); + } + +public void readRef(ObjectInputStream s) throws IOException + { + super.readRef(s); + robot = (GenericRobot) level.FindItem(s.readInt()); + } + +public void GenerateIcons() + { + robot = (GenericRobot) room.portalItem; + if (ports==null) + { + ports = new Port[1]; + switch(rotation) + { + case Port.ROT_UP: + width=30; height=42; + ports[0] = new Port(16,39,Port.TYPE_OUTPUT,26,Port.ROT_DOWN,this); + break; + + case Port.ROT_RIGHT: + width=54; height=24; + ports[0] = new Port(0,13,Port.TYPE_OUTPUT,42,Port.ROT_LEFT,this); + break; + + case Port.ROT_DOWN: + width=30; height=38; + ports[0] = new Port(13,2,Port.TYPE_OUTPUT,22,Port.ROT_UP,this); + break; + + case Port.ROT_LEFT: + width=54; height=24; + ports[0] = new Port(52,10,Port.TYPE_OUTPUT,40,Port.ROT_RIGHT,this); + break; + } + } + else + for (int a=0; a=0 && a<19 && bigY>=0 && bigY<12) + if (robot.level.materialAt(a,bigY,robot.room).Detectable(robot)) + collide = true; + ports[0].value=collide; + robot.topBumper = collide; + } + break; + case Port.ROT_RIGHT: // Right Bumper + { + int bigX = (X+60)/28; + int bigYt = (Y+5) / 32; + int bigYb = (Y+36) / 32; + boolean collide = false; + for (int a=bigYt; a<=bigYb; a++) +// if (a>=0 && a<12 && bigX>=0 && bigX<20) + if (robot.level.materialAt(bigX,a,robot.room).Detectable(robot)) + collide = true; + ports[0].value=collide; + robot.rightBumper = collide; + } + break; + case Port.ROT_DOWN: // Bottom Bumper + { + int bigXl = (X+14) / 28; + int bigXr = (X+41) / 28; + int bigY = (Y+44)/32; + boolean collide = false; + for (int a=bigXl; a<=bigXr; a++) +// if (a>=0 && a<19 && bigY>=0 && bigY<12) + if (robot.level.materialAt(a,bigY,robot.room).Detectable(robot)) + collide = true; + ports[0].value=collide; + robot.bottomBumper = collide; + } + break; + case Port.ROT_LEFT: // Left Bumper + { + int bigX = (X-3) / 28; + int bigYt = (Y+5) / 32; + int bigYb = (Y+36) / 32; + boolean collide = false; + for (int a=bigYt; a<=bigYb; a++) +// if (a>=0 && a<12 && bigX>=0 && bigX<20) + if (robot.level.materialAt(bigX,a,robot.room).Detectable(robot)) + collide = true; + ports[0].value=collide; + robot.leftBumper = collide; + } + break; + } + + return false; + } + +public void Erase() + { + super.Erase(); + robot = null; + } + +} diff --git a/src/com/droidquest/devices/ChipText.java b/src/com/droidquest/devices/ChipText.java new file mode 100644 index 0000000..957ca6d --- /dev/null +++ b/src/com/droidquest/devices/ChipText.java @@ -0,0 +1,86 @@ +package com.droidquest.devices; + +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.JTextField; + +public class ChipText extends JDialog +{ +JTextArea textarea; +JTextField textfield; +GenericChip myChip; + +public ChipText(GenericChip gc) + { + myChip=gc; + setModal(false); + Container contentPane = getContentPane(); + contentPane.setLayout(new BorderLayout()); + contentPane.setSize(new Dimension(250,300)); + + textarea = new JTextArea("This is a test."); + textarea.setFont(new Font("Serif", Font.PLAIN, 16)); + textarea.setLineWrap(true); + textarea.setWrapStyleWord(true); + + JScrollPane scrollpane = new JScrollPane(textarea); + scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); + scrollpane.setPreferredSize(new Dimension(250,250)); + + JPanel buttonpanel = new JPanel(); + buttonpanel.setLayout(new FlowLayout()); + + JButton saveButton = new JButton("Save"); + JButton restoreButton = new JButton("Restore"); + + textfield = new JTextField(3); + + buttonpanel.add(saveButton); + buttonpanel.add(restoreButton); + buttonpanel.add(textfield); + + contentPane.add(buttonpanel, BorderLayout.NORTH); + contentPane.add(scrollpane, BorderLayout.CENTER); + pack(); + + saveButton.addMouseListener(new MouseAdapter() { + public void mouseReleased(MouseEvent e) { + myChip.description = textarea.getText(); + myChip.label = textfield.getText(); + myChip.GenerateIcons(); + } + }); + + restoreButton.addMouseListener(new MouseAdapter() { + public void mouseReleased(MouseEvent e) { + textarea.setText(myChip.description); + textfield.setText(myChip.label); + } + }); + + } + +public void setEditable(boolean editable) + { + textarea.setEditable(editable); + } + +public void setText(String text, String label) + { + textarea.setText(text); + textfield.setText(label); + } + + +} \ No newline at end of file diff --git a/src/com/droidquest/devices/ContactSensor.java b/src/com/droidquest/devices/ContactSensor.java new file mode 100644 index 0000000..72c53dd --- /dev/null +++ b/src/com/droidquest/devices/ContactSensor.java @@ -0,0 +1,167 @@ +package com.droidquest.devices; + +import java.awt.Dimension; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; +import com.droidquest.items.Item; + +public class ContactSensor extends Device +{ +String targetClass; +Item target; +Dimension d1 = new Dimension(); // Output pointing Right, Left +Dimension d2 = new Dimension(); // Output pointing Up, Down + +public ContactSensor(int X, int Y, Room r, Item item) + { + x=X; y=Y; room = r; + target = item; + editable=true; + targetClass = target.getClass().toString().substring(6); // Removes "class " + rotation = 1; // Right + d1.width = 28 + target.getWidth(); + d1.height = Math.max(target.getHeight(),12); + d2.width = Math.max(target.getWidth(),12); + d2.height = 28 + target.getHeight(); + width = d1.width; + height = d1.height; + GenerateIcons(); + } + +public void GenerateIcons() + { + if (ports==null) + { + ports = new Port[1]; + ports[0] = new Port(width-2,height/2-2,Port.TYPE_OUTPUT,24,Port.ROT_UP,this); + if (rotation > 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r X + width) + { + ports[1].value=true; + a=level.items.size(); + } + if (item.y + item.getHeight() > Y + height) + { + ports[2].value=true; + a=level.items.size(); + } + if (item.x < X) + { + ports[3].value=true; + a=level.items.size(); + } + } + } + } + else + { + // Directional Sensor is inside Robot. + for (int a=0;a X + room.portalItem.getWidth()) + { + ports[1].value=true; + a=level.items.size(); + } + if (item.y + item.getHeight() > Y + room.portalItem.getHeight()) + { + ports[2].value=true; + a=level.items.size(); + } + if (item.x < X) + { + ports[3].value=true; + a=level.items.size(); + } + } + } + } + return false; + } + +public void Decorate() + { + super.Decorate(); + g.setColor(Color.white); + g.drawRect(24,24,target.getWidth()+12, target.getHeight()+12); + g.drawRect(25,25,target.getWidth()+10, target.getHeight()+10); + g.drawImage(target.currentIcon, 30, 30, level); + } + +public void rotate(int dir) + { + // Does not Rotate! + } + +public void Erase() + { + super.Erase(); + target = null; + } + +} + diff --git a/src/com/droidquest/devices/FlipFlop.java b/src/com/droidquest/devices/FlipFlop.java new file mode 100644 index 0000000..4a0028c --- /dev/null +++ b/src/com/droidquest/devices/FlipFlop.java @@ -0,0 +1,188 @@ +package com.droidquest.devices; + +import com.droidquest.devices.Device; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.Wire; +import com.droidquest.chipstuff.Port; + +public class FlipFlop extends Device +{ +public boolean state; +public Color c1; +public Color c2; +public transient ImageIcon images[]; + +public FlipFlop(int X, int Y, Room r) + { + x=X; y=Y; room =r; + width=48; height=32; + GenerateIcons(); + currentIcon = icons[rotation%2].getImage(); + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to ANDGate Image"); + return; + } + + } + +public void Decorate() + { + super.Decorate(); + if (!state) + g.drawImage(images[4+rotation].getImage(), 0, 0, level); + else + g.drawImage(images[rotation].getImage(), 0, 0, level); + } + +public void GenerateIcons() + { + super.GenerateIcons(); + if (ports==null) + { + ports = new Port[4]; + ports[0] = new Port(11,29,Port.TYPE_INPUT,6,Port.ROT_DOWN,this); + ports[1] = new Port(39,27,Port.TYPE_INPUT,4,Port.ROT_DOWN,this); + ports[2] = new Port(8,2,Port.TYPE_OUTPUT,8,Port.ROT_UP,this); + ports[3] = new Port(36,0,Port.TYPE_OUTPUT,10,Port.ROT_UP ,this); + if (rotation > 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r=28+robot.x && CY<21+robot.y) + { + // Move item to robot.x,robot.y + item.x = robot.x+60-item.getWidth()/2; + item.y = robot.y-9-item.getHeight()/2; + robot.grabber = Port.ROT_UP; + robot.PicksUp(item); + } + + if (CX>=28+robot.x && CY>=21+robot.y) + { + // Move item to robot.x,robot.y + item.x = robot.x+66-item.getWidth()/2; + item.y = robot.y+41-item.getHeight()/2; + robot.grabber = Port.ROT_RIGHT; + robot.PicksUp(item); + } + + if (CX<28+robot.x && CY>=21+robot.y) + { + // Move item to robot.x,robot.y + item.x = robot.x+5-item.getWidth()/2; + item.y = robot.y+52-item.getHeight()/2; + robot.grabber = Port.ROT_DOWN; + robot.PicksUp(item); + } + + if (CX<28+robot.x && CY<21+robot.y) + { + // Move item to robot.x,robot.y + item.x = robot.x-5-item.getWidth()/2; + item.y = robot.y+3-item.getHeight()/2; + robot.grabber = Port.ROT_LEFT; + robot.PicksUp(item); + } + + } + } + } + } + + return false; + } + +public void Erase() + { + super.Erase(); + robot = null; + } + +} diff --git a/src/com/droidquest/devices/NOTGate.java b/src/com/droidquest/devices/NOTGate.java new file mode 100644 index 0000000..bb35e6d --- /dev/null +++ b/src/com/droidquest/devices/NOTGate.java @@ -0,0 +1,158 @@ +package com.droidquest.devices; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; + +public class NOTGate extends Device +{ +transient ImageIcon images[]; + +public NOTGate(int X, int Y, Room r) + { + x=X; y=Y; room =r; + width=28; height=50; + GenerateIcons(); + currentIcon = icons[rotation%2].getImage(); + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to ANDGate Image"); + return; + } + + } + +public void Decorate() + { + super.Decorate(); + if (!ports[0].value) + g.drawImage(images[4+rotation].getImage(), 0, 0, level); + else + g.drawImage(images[rotation].getImage(), 0, 0, level); + } + +public void GenerateIcons() + { + super.GenerateIcons(); + if (ports==null) + { + ports = new Port[2]; + ports[0] = new Port(15,47,Port.TYPE_INPUT,12,Port.ROT_DOWN,this); + ports[1] = new Port(12,2,Port.TYPE_OUTPUT,14,Port.ROT_UP,this); + if (rotation > 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r19) bigXr=19; + if (bigYb>11) bigYb=11; + + for (int a=bigYt; a<=bigYb; a++) + for (int b=bigXl; b<=bigXr; b++) + { + if (level.materials.elementAt(room.RoomArray[a][b]) instanceof ChipTrash) + { + SetRoom(null); + level.items.removeElement(this); + level.PlaySound(room,level.DISCHARGESOUND); + return; + } + } + } + +public boolean Function() + { + // Transfer values bewteen the ports and the portdevices. + boolean changed = false; + for (int a = 0; a<16; a++) + { + Port outer = ports[a]; + Port inner = portdevices[a].ports[0]; + + if (outer.type == Port.TYPE_INPUT) + if (outer.value != inner.value) + { + changed=true; + inner.value = outer.value; + } + if (outer.type == Port.TYPE_OUTPUT) + if (outer.value != inner.value) + { + changed=true; + outer.value = inner.value; + } + + + if (outer.myWire==null && inner.myWire==null) + { + outer.type = Port.TYPE_UNDEFINED; + inner.type = Port.TYPE_UNDEFINED; + } + + if (outer.type == Port.TYPE_UNDEFINED) + { + if (inner.myWire != null) + { + if (inner.type == Port.TYPE_INPUT) + outer.type = Port.TYPE_OUTPUT; + else if (inner.type == Port.TYPE_OUTPUT) + outer.type = Port.TYPE_INPUT; + } + } + if (inner.type == Port.TYPE_UNDEFINED) + { + if (outer.myWire != null) + { + if (outer.type == Port.TYPE_INPUT) + inner.type = Port.TYPE_OUTPUT; + else if (outer.type == Port.TYPE_OUTPUT) + inner.type = Port.TYPE_INPUT; + } + } + + } + return changed; + } + +public void Erase() + { + super.Erase(); + for (int a=0; a19) bigXr=19; + if (bigYb>11) bigYb=11; + + for (int a=bigYt; a<=bigYb; a++) + for (int b=bigXl; b<=bigXr; b++) + { + if (level.materials.elementAt(room.RoomArray[a][b]) instanceof ChipTrash) + { + SetRoom(null); + level.items.removeElement(this); + level.PlaySound(room,level.DISCHARGESOUND); + return; + } + } + } + +public void Erase() + { + super.Erase(); + for (int a=0; a19) bigXr=19; + if (bigYb>11) bigYb=11; + + for (int a=bigYt; a<=bigYb; a++) + for (int b=bigXl; b<=bigXr; b++) + { + if (level.materials.elementAt(room.RoomArray[a][b]).getClass().toString().endsWith("PrototypeBurner")) + { + a=bigYb; b=bigXr; + x = 3*28+4; + y = 5*32+12; + inBurner=true; + } + if (level.materials.elementAt(room.RoomArray[a][b]).getClass().toString().endsWith("ChipTrash")) + { + level.items.removeElement(this); + level.PlaySound(room,level.DISCHARGESOUND); + } + if (level.materials.elementAt(room.RoomArray[a][b]).getClass().toString().endsWith("ChipTester")) + { + a=bigYb; b=bigXr; + x = 10*28-width/2; + y = 5*32-height/2; + inTester=true; + } + } + } + +public void Erase() + { + super.Erase(); + for (int a=0; a 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r=0) + portSignals[a].internalSignal = (Signal) signals.elementAt(portIndex); + portSignals[a].type = s.readInt(); + } + for (int a=0; a=0) + gate.portSignals[b].externalSignal = (Signal) signals.elementAt(sigIndex); + gate.portSignals[b].type = s.readInt(); + } + gate.readRef(s); + } + } + +public void Decorate() + {} + +public void IsDropped() + { + inBurner = false; + inTester = false; + int bigXl = (x)/28; + int bigXr = (x+width-1)/28; + int bigYt = (y)/32; + int bigYb = (y+height-1)/32; + + if (bigXr>19) bigXr=19; + if (bigYb>11) bigYb=11; + + for (int a=bigYt; a<=bigYb; a++) + for (int b=bigXl; b<=bigXr; b++) + { + if (room.MaterialArray[a][b] instanceof SmallChipBurner) + { + a=bigYb; b=bigXr; + x = 13*28 - width/2; + y = 8*32 - height/2; + inBurner=true; + ChipCompiler.chipSpeed = speed; + TextBox tb = (TextBox) room.textBoxes.elementAt(1); + tb.textString= speed + "x"; + return; + } + if (room.MaterialArray[a][b] instanceof ChipTrash) + { + SetRoom(null); // Cheap way to remove the wires; + level.items.removeElement(this); + level.PlaySound(room,level.DISCHARGESOUND); + return; + } + if (room.MaterialArray[a][b] instanceof ChipTester) + { + a=bigYb; b=bigXr; + x = 10*28-width/2; + y = 5*32-height/2; + inTester=true; + return; + } + } + } + +public boolean Function() + { + int a; + + for (int s=0; s=0) + gate.portSignals[b].externalSignal = (Signal) signals.elementAt(sigIndex); + gate.portSignals[b].type = s.readInt(); + } + if (gate.type.equalsIgnoreCase("Chip")) + gate.LoadSubGate(s); + } + + // PortSignals + for (int a=0; a<8; a++) + { + int sigIndex = s.readInt(); + if (sigIndex>=0) + portSignals[a].internalSignal = (Signal) signals.elementAt(sigIndex); + ports[a].type = s.readInt(); + portSignals[a].type = ports[a].type; + } + + // Description + description = (String) s.readObject(); + + // Speed + speed = s.readInt(); + + s.close(); + in.close(); + } + catch (ClassNotFoundException e) {} + catch (FileNotFoundException e) + { + System.out.println("File Not Found"); + return; + } + catch (IOException e) + { + System.out.println("IO Exception"); + System.out.println(e.getMessage()); + e.printStackTrace(); + return; + } + + // Debug report +// System.out.println(signals.size() + " Signals"); +// System.out.println(gates.size() + " Gates"); +// for(int a=0; a 0) + { + int rot = rotation; + if (rotation%2==1) + { + int temp = width; + width = height; + height = temp; + } + rotation = 0; + for (int r=0; r0) + { + previousBehavior=behaviorState; + behaviorState=6; + a=level.items.size(); + } + } + switch (behaviorState) + { + case 0: + if (level.player.room == room) behaviorState=1; + break; + case 1: + if (y>=192) + behaviorState = 2; + else + { + MoveDown( 8); + if (x<280) MoveRight(8); + if (x>280) MoveLeft(8); + } + break; + case 2: + if (room==(Room) level.rooms.elementAt(18) && x<=280) + behaviorState = 3; + else + { + MoveLeft( 8); + if (y<192) MoveDown(8); + if (y>192) MoveUp(8); + } + break; + case 3: + if (room==(Room) level.rooms.elementAt(19) && y<=192) + behaviorState = 4; + else + { + MoveUp( 8); + if (x<280) MoveRight(8); + if (x>280) MoveLeft(8); + } + break; + case 4: + if (room==(Room) level.rooms.elementAt(15) && x>=280) + behaviorState = 5; + else + { + MoveRight( 8); + if (y<192) MoveDown(8); + if (y>192) MoveUp(8); + } + break; + case 5: + if (room==(Room) level.rooms.elementAt(16) && y>=192) + behaviorState = 2; + else + { + MoveDown( 8); + if (x<280) MoveRight(8); + if (x>280) MoveLeft(8); + } + break; + case 6: + if (target.room != room) + behaviorState = previousBehavior; + if (Overlaps(target)) + { + behaviorState=7; + break; + } + Dimension d = target.GetXY(); + if (d.widthx) MoveRight(false); + if (d.heighty) MoveDown(false); + break; + case 7: + if (target.room != room) + { + behaviorState = previousBehavior; + break; + } + if (target.charge>0 && Overlaps(target)) + { + if (target.getClass().toString().endsWith("BlackCrystal")) + alive = false; + else + target.charge-=3125; + } + else + behaviorState = 6; + if (target.charge <=0) + { + target.charge=0; + behaviorState=previousBehavior; + } + break; + } + } + } + +public void Erase() + { + super.Erase(); + target = null; + } + +} diff --git a/src/com/droidquest/items/AutoWire.java b/src/com/droidquest/items/AutoWire.java new file mode 100644 index 0000000..aed7b56 --- /dev/null +++ b/src/com/droidquest/items/AutoWire.java @@ -0,0 +1,177 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.Wire; +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.Device; +import com.droidquest.devices.PortDevice; +import com.droidquest.devices.PrototypeChip; +import com.droidquest.devices.SmallChip; + +public class AutoWire extends Item +{ +int animation; // 0=Wait to Wire + // 1-8 = Wiring/Unwiring Port 1-8 +Device chip; +PortDevice[] portdevices = new PortDevice[8]; + +public AutoWire(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=30; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[2]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + + // 0 = Off + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(Color.white); + g.fillRect(0,0,28,30); + g.setColor(Color.black); + g.fillRect(8,8,12,14); + g.fillRect(4,10,20,10); + g.setColor(Color.white); + g.fillRect(12,10,4,10); + g.fillRect(8,12,12,6); + + // 1 = On + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(new Color(255,128,0)); + g.fillRect(0,0,28,30); + g.setColor(Color.black); + g.fillRect(8,8,12,14); + g.fillRect(4,10,20,10); + g.setColor(new Color(255,128,0)); + g.fillRect(12,10,4,10); + g.fillRect(8,12,12,6); + + currentIcon = icons[0].getImage(); + + } + +public boolean CanBePickedUp(Item i) + { + if (animation!=0) return false; + // Find the Item that has inTester set true; + chip=null; + int pdcount =0; + for (int a=0; a=2 && animation <=8) + { + if (portdevices[0].ports[0].myWire!=null) + { // Wiring + if (portdevices[animation-1].ports[0].myWire==null) + { + portdevices[animation-1].ports[0].type = Port.TYPE_UNDEFINED; + portdevices[animation-1].ports[0].value = false; + Wire wire = new Wire(portdevices[animation-1].ports[0], chip.ports[animation-1]); + } + } + else + { // Unwiring + if (portdevices[animation-1].ports[0].myWire!=null) + { + portdevices[animation-1].ports[0].myWire.Remove(); + portdevices[animation-1].ports[0].type = Port.TYPE_UNDEFINED; + portdevices[animation-1].ports[0].value = false; + } + } + animation++; + } + + if (animation==9) + { + currentIcon = icons[0].getImage(); + animation=0; + } + + } + +public void Erase() + { + super.Erase(); + chip=null; + portdevices = null; + } + +} diff --git a/src/com/droidquest/items/BinaryKey.java b/src/com/droidquest/items/BinaryKey.java new file mode 100644 index 0000000..3d89ade --- /dev/null +++ b/src/com/droidquest/items/BinaryKey.java @@ -0,0 +1,58 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class BinaryKey extends Item +{ +public BinaryKey (int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=26; height=28; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(new Color(255,128,0)); + g.fillRect(4,0,4,8); + g.fillRect(4,10,4,2); + g.fillRect(0,12,4,4); + g.fillRect(8,12,4,4); + g.fillRect(4,16,4,2); + g.fillRect(4,20,4,8); + g.fillRect(16,0,4,2); + g.fillRect(12,2,4,4); + g.fillRect(20,2,4,4); + g.fillRect(16,6,4,2); + g.fillRect(16,10,4,8); + g.fillRect(16,20,4,2); + g.fillRect(12,22,4,4); + g.fillRect(20,22,4,4); + g.fillRect(16,26,4,2); + currentIcon = icons[0].getImage(); + } + +} diff --git a/src/com/droidquest/items/BlackCrystal.java b/src/com/droidquest/items/BlackCrystal.java new file mode 100644 index 0000000..ccdb273 --- /dev/null +++ b/src/com/droidquest/items/BlackCrystal.java @@ -0,0 +1,54 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class BlackCrystal extends Crystal +{ +public BlackCrystal(int X, int Y, Room r) + { + super(X,Y,r,0); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + + // 0 = blue + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.black); + g.fillRect(12,0,4,24); + g.fillRect(8,4,12,16); + g.fillRect(4,6,20,12); + g.fillRect(0,10,28,4); + g.fillRect(0,4,4,2); + g.fillRect(0,18,4,2); + g.fillRect(24,4,4,2); + g.fillRect(24,18,4,2); + currentIcon = icons[0].getImage(); + } + +public void Decorate() {} + +} \ No newline at end of file diff --git a/src/com/droidquest/items/BlueRobot.java b/src/com/droidquest/items/BlueRobot.java new file mode 100644 index 0000000..32a587e --- /dev/null +++ b/src/com/droidquest/items/BlueRobot.java @@ -0,0 +1,62 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; + +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.Bumper; +import com.droidquest.devices.Grabber; +import com.droidquest.devices.Thruster; + +public class BlueRobot extends GenericRobot +{ +private int scan; +private int scandir; + +public BlueRobot(int X, int Y, Room r) + { + super(X,Y,r,Color.blue); + scan=0; + scandir=2; + Animate(); + devices[0] = new Thruster(176,16,InternalRoom,Port.ROT_UP,Color.white); + devices[1] = new Thruster(476,128,InternalRoom,Port.ROT_RIGHT,Color.white); + devices[2] = new Thruster(356,336,InternalRoom,Port.ROT_DOWN,Color.white); + devices[3] = new Thruster(32,236,InternalRoom,Port.ROT_LEFT,Color.white); + devices[4] = new Bumper(396,16,InternalRoom,Port.ROT_UP,Color.white); + devices[5] = new Bumper(480,256,InternalRoom,Port.ROT_RIGHT,Color.white); + devices[6] = new Bumper(128,330,InternalRoom,Port.ROT_DOWN,Color.white); + devices[7] = new Bumper(28,134,InternalRoom,Port.ROT_LEFT,Color.white); + devices[8] = new Antenna(64,70,InternalRoom,Color.white); + devices[9] = new Grabber(126,44,InternalRoom,Color.white); + for (int a=0; a<10; a++) + level.items.addElement(devices[a]); + + } + +public void Decorate() + { + super.Decorate(); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + g.setColor(Color.black); + g.fillRect(22,44,42,4); + + if (scan+scandir>36 || scan+scandir<0) + scandir=-scandir; + scan=scan+scandir; + g.setColor(new Color(255,128,0)); + g.fillRect(22+scan,44,6,4); + } + +} diff --git a/src/com/droidquest/items/Burner.java b/src/com/droidquest/items/Burner.java new file mode 100644 index 0000000..3bda1b0 --- /dev/null +++ b/src/com/droidquest/items/Burner.java @@ -0,0 +1,131 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.Wire; +import com.droidquest.chipstuff.ChipCompiler; +import com.droidquest.chipstuff.Gate; +import com.droidquest.chipstuff.Signal; +import com.droidquest.devices.Device; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.PrototypeChip; +import com.droidquest.devices.SmallChip; +import com.droidquest.levels.Level; + +public class Burner extends Item +{ +int burning; +int animation; + +public Burner(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=30; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[2]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + + // 0 = Off + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(Color.white); + g.fillRect(0,0,28,30); + g.setColor(Color.black); + g.fillRect(8,8,12,14); + g.fillRect(4,10,20,10); + g.setColor(Color.white); + g.fillRect(12,10,4,10); + g.fillRect(8,12,12,6); + + // 1 = On + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(new Color(255,128,0)); + g.fillRect(0,0,28,30); + g.setColor(Color.black); + g.fillRect(8,8,12,14); + g.fillRect(4,10,20,10); + g.setColor(new Color(255,128,0)); + g.fillRect(12,10,4,10); + g.fillRect(8,12,12,6); + + currentIcon = icons[0].getImage(); + + } + +public boolean CanBePickedUp(Item i) + { + // Find the SmallChip and Erase it + Item sc=null; + for (int a=0; a0) + { + animation = 1- animation; + currentIcon = icons[animation].getImage(); + burning--; + } + else + currentIcon = icons[0].getImage(); + } + +} + diff --git a/src/com/droidquest/items/Button.java b/src/com/droidquest/items/Button.java new file mode 100644 index 0000000..ca718c3 --- /dev/null +++ b/src/com/droidquest/items/Button.java @@ -0,0 +1,55 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Button extends Item +{ +Color color; + +public Button(int X, int Y, Room r, Color c) + { + x=X; y=Y; room=r; + width=28; height=26; + color=c; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(color); + g.fillRect(8,0,12,26); + g.fillRect(4,2,20,22); + g.fillRect(0,4,28,18); + g.setColor(Color.black); + g.fillRect(8,6,12,14); + g.fillRect(4,8,20,10); + g.setColor(color); + g.fillRect(12,8,4,10); + g.fillRect(8,10,12,6); + currentIcon = icons[0].getImage(); + } + +} \ No newline at end of file diff --git a/src/com/droidquest/items/CamDisk.java b/src/com/droidquest/items/CamDisk.java new file mode 100644 index 0000000..21c616c --- /dev/null +++ b/src/com/droidquest/items/CamDisk.java @@ -0,0 +1,44 @@ +package com.droidquest.items; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.decorations.TextBox; +import com.droidquest.materials.Material; + +public class CamDisk extends Disk +{ +transient SpyCam spycam=null; + +public CamDisk(int X, int Y, Room r) + { + super(X,Y,r,Color.white,0); + } + +public void IsDropped() + { + if (spycam==null) + for (int a=0; a=0; a--) + { + Wire wire = (Wire)pc.InternalRoom.wires.elementAt(a); + wire.Remove(); + } + + for (int a=0; a<8; a++) + { + pc.portdevices[a].ports[0].type = Port.TYPE_UNDEFINED; + pc.ports[a].type = Port.TYPE_UNDEFINED; + pc.ports[a].value = false; + } + + for (int a=0; a4) // Need many nodes + { + Port[] ports = new Port[numConnections]; + for (int b=0; b 504) device.x = 504; + if (device.y < 32) device.y = 32; + if (device.y > 320) device.y = 320; + } + } + + // Rotate devices to point to the "next" device. AND, OR, NOT, XOR only + for (int a=0; aMath.abs(dy)) + { + if (dx<0) device.rotate(-1); + else device.rotate(1); + } + else + { + if (dy>0) + { + device.rotate(1); + device.rotate(1); + } + } + } + + } + } + + pc.grabbable = true; + sc.grabbable = true; + + } + +public Port FindPort(Signal sig, int num, PrototypeChip pc, SmallChip sc, Vector deviceList) +{ + // Find Nth port that this signal attaches to in given SmallChip. + + int n=0; + + for (int a=0; a<8; a++) + if (sc.portSignals[a].internalSignal == sig) + { + n++; + if (n==num) return pc.portdevices[a].ports[0]; + } + for (int a=0; a0) + { + color = 1-color; + currentIcon = icons[color].getImage(); + } + else + currentIcon = icons[2].getImage(); + } + +} + diff --git a/src/com/droidquest/items/Disk.java b/src/com/droidquest/items/Disk.java new file mode 100644 index 0000000..d33a10d --- /dev/null +++ b/src/com/droidquest/items/Disk.java @@ -0,0 +1,95 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.decorations.TextBox; +import com.droidquest.materials.Material; + +public class Disk extends Item +{ +transient Room helpRoom = null; +Color color; +transient Room helpCamRoom = null; + +public Disk(int X, int Y, Room r, Color col, int hr) + { + x=X; y=Y; room=r; + color = col; + width=28; height=24; + grabbable=true; + helpRoom = (Room) level.rooms.elementAt(hr); + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(color); + g.fillRect(0,0,width,height); + g.setColor(Color.black); + g.fillRect(24,4,4,2); + g.fillRect(12,8,4,8); + g.fillRect(8,10,12,4); + g.fillRect(20,14,4,2); + g.fillRect(12,18,4,4); + currentIcon = icons[0].getImage(); + } + + +public void writeRef(ObjectOutputStream s) throws IOException + { + super.writeRef(s); + s.writeInt(level.rooms.indexOf(helpRoom)); + } + +public void readRef(ObjectInputStream s) throws IOException + { + super.readRef(s); + helpRoom = (Room) level.FindRoom(s.readInt()); + } + +public void IsDropped() + { + + int bigX = (x+width/2)/28; + int bigY = (y+height/2)/32; + Material mat = room.MaterialArray[bigY][bigX]; + if (mat.getClass().toString().endsWith("Monitor")) + { + helpCamRoom = level.helpCam.room; // Temporary storage + level.helpCam.room = helpRoom; + level.currentViewer=level.helpCam; + level.player=level.helpCam; + } + } + +public boolean CanBePickedUp(Item item) + { + if (level.helpCam.room == room) + level.helpCam.room = helpCamRoom; + level.currentViewer = level.player; + return true; + } + +} + + diff --git a/src/com/droidquest/items/ElevatorKey.java b/src/com/droidquest/items/ElevatorKey.java new file mode 100644 index 0000000..fca9039 --- /dev/null +++ b/src/com/droidquest/items/ElevatorKey.java @@ -0,0 +1,63 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class ElevatorKey extends Item +{ +boolean jumping=true; + +public ElevatorKey(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=32; + grabbable=true; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(Color.white); + g.fillRect(0,0,28,32); + g.setColor(Color.black); + g.fillRect(4,4,4,2); + g.fillRect(12,4,4,2); + g.fillRect(4,8,4,2); + g.fillRect(20,8,4,2); + g.fillRect(20,26,4,2); + g.fillRect(4,14,12,4); + g.fillRect(4,22,12,4); + g.fillRect(20,12,4,12); + currentIcon = icons[0].getImage(); + } + +public void Animate() + { + if (carriedBy!=null) + jumping=false; + + if (jumping==true) + { + x=level.random.nextInt(8*28)+28; + y=level.random.nextInt(2*32)+(8*32); + } + } + +} \ No newline at end of file diff --git a/src/com/droidquest/items/ElevatorSwitch.java b/src/com/droidquest/items/ElevatorSwitch.java new file mode 100644 index 0000000..40d93d1 --- /dev/null +++ b/src/com/droidquest/items/ElevatorSwitch.java @@ -0,0 +1,86 @@ +package com.droidquest.items; + +import com.droidquest.Room; +import com.droidquest.decorations.Arrow; +import com.droidquest.materials.ElevatorOutPortal; +import com.droidquest.materials.Switch; + +public class ElevatorSwitch extends Switch +{ +int animationState=0; +// 0=open +// 1=closing +// 2=closing +// 3=switch arrow, switch outRoom +// 4=opening +// 5=opening +transient static Room room; + +public ElevatorSwitch() + { + super(Switch.ROT_LEFT); + } + +public void TouchedByItem(Item item) + { + room = item.room; + if (animationState==0) + animationState = 1; + } + +public void Animate() + { + super.Animate(); + switch (animationState) + { + case 0: value =false; break; + case 1: + // Play sound + value=true; + room.SetMaterial(0,7,4); + room.SetMaterial(0,10,4); + animationState++; + break; + case 2: + room.SetMaterial(0,8,4); + room.SetMaterial(0,9,4); + animationState++; + break; + case 3: + if (ElevatorOutPortal.outRoom == (Room) level.rooms.elementAt(11)) + { + for (int a=0; a 2) diff = 2; + MoveRight(diff * dir); + } + if (y != goToY) + { + int diff = Math.abs(goToY - y); + int dir = diff / (goToY - y); + if (diff > 2) diff = 2; + MoveDown(diff * dir); + } + } + else + { + behavior=0; + level.items.removeElement(carrying); + carrying = null; + StormShield ss=null; + for (int a=0; a0 && level.electricity && (carriedBy == null) && thrusterPower) + { + if (topThruster) + MoveDown(8); + if (rightThruster) + MoveLeft(8); + if (bottomThruster) + MoveUp(8); + if (leftThruster) + MoveRight(8); + } + + if (charge>0 && level.electricity && thrusterPower) + { + Dimension d = GetXY(); + int X = d.width; + int Y = d.height; + if (topThruster) + { + level.sparks.addElement(new Spark(X-orgX+32+level.random.nextInt(24),Y-orgY+24,0,-4,room)); + level.sparks.addElement(new Spark(X-orgX+32+level.random.nextInt(24),Y-orgY+24,0,-4,room)); + charge-=2; + } + if (rightThruster) + { + level.sparks.addElement(new Spark(X-orgX+74,Y-orgY+36+level.random.nextInt(20),4,0,room)); + level.sparks.addElement(new Spark(X-orgX+74,Y-orgY+36+level.random.nextInt(20),4,0,room)); + charge-=2; + } + if (bottomThruster) + { + level.sparks.addElement(new Spark(X-orgX+32+level.random.nextInt(24),Y-orgY+64,0,4,room)); + level.sparks.addElement(new Spark(X-orgX+32+level.random.nextInt(24),Y-orgY+64,0,4,room)); + charge-=2; + } + if (leftThruster) + { + level.sparks.addElement(new Spark(X-orgX+14,Y-orgY+36+level.random.nextInt(20),-4,0,room)); + level.sparks.addElement(new Spark(X-orgX+14,Y-orgY+36+level.random.nextInt(20),-4,0,room)); + charge-=2; + } + charge--; + if (charge<0) charge=0; + } + + + // Draw Antenna sparks around Broadcasting Antenna + if (broadcasting && level.electricity) + { + Dimension d = GetXY(); + level.sparks.addElement(new Spark(d.width-orgX+34,d.height-orgY+10, + level.random.nextInt(9)-4, + level.random.nextInt(9)-4, + room)); + } + + // Make sounds + if (topBumper) + if (oldTopBumper != topBumper) + level.PlaySound(room, Level.BUMPSOUND); + if (bottomBumper) + if (oldBottomBumper != bottomBumper) + level.PlaySound(room, Level.BUMPSOUND); + if (rightBumper) + if (oldRightBumper != rightBumper) + level.PlaySound(room, Level.BUMPSOUND); + if (leftBumper) + if (oldLeftBumper != leftBumper) + level.PlaySound(room, Level.BUMPSOUND); + if (broadcasting && level.electricity) + level.PlaySound(room, Level.BEEPSOUND); + oldTopBumper = topBumper; + oldBottomBumper = bottomBumper; + oldRightBumper = rightBumper; + oldLeftBumper = leftBumper; + + } + +public void Decorate() + { + // Paint background + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,123,92); + + // Paint Robot Body + g.drawImage(images[0].getImage(), 0, 0, level); + + // Draw Bumpers + if (topBumper) + g.setColor(new Color(255,128,0)); + else + g.setColor(Color.white); + g.fillRect(32,24,22,2); + + if (bottomBumper) + g.setColor(new Color(255,128,0)); + else + g.setColor(Color.white); + g.fillRect(32,66,22,2); + + if (leftBumper) + g.setColor(new Color(255,128,0)); + else + g.setColor(Color.white); + g.fillRect(12,36,4,20); + + if (rightBumper) + g.setColor(new Color(255,128,0)); + else + g.setColor(Color.white); + g.fillRect(70,36,4,20); + + // Draw Antenna + if (antenna) + g.drawImage(images[6].getImage(), 0, 0, level); + else + g.drawImage(images[5].getImage(), 0, 0, level); + + // Draw Grabber + g.setColor(Color.white); + switch (grabber) + { + case Port.ROT_UP: + g.drawImage(images[1].getImage(), 0, 0, level); + break; + case Port.ROT_RIGHT: + g.drawImage(images[2].getImage(), 0, 0, level); + break; + case Port.ROT_DOWN: + g.drawImage(images[3].getImage(), 0, 0, level); + break; + case Port.ROT_LEFT: + g.drawImage(images[4].getImage(), 0, 0, level); + break; + } + + // Draw Periscope +// if (periscope) + if (level.currentViewer == this) + { + periscopeAnimation ++; + if (periscopeAnimation == 32) periscopeAnimation =0; + if (periscopeAnimation <8) + g.drawImage(images[7].getImage(), 0, 0, level); + if ((periscopeAnimation >=8 && periscopeAnimation <16) + || periscopeAnimation >=24) + g.drawImage(images[8].getImage(), 0, 0, level); + if (periscopeAnimation >=16 && periscopeAnimation <24) + g.drawImage(images[9].getImage(), 0, 0, level); + } + +// g.setColor(Color.magenta); +// g.drawRect(orgX+leftPortal.x, orgY+leftPortal.y, +// leftPortal.width+28, leftPortal.height+32); +// g.drawRect(orgX+rightPortal.x, orgY+rightPortal.y, +// rightPortal.width+28, rightPortal.height+32); +// g.drawRect(orgX+upPortal.x, orgY+upPortal.y, +// upPortal.width+28, upPortal.height+32); +// g.drawRect(orgX+downPortal.x, orgY+downPortal.y, +// downPortal.width+28, downPortal.height+32); + + } + +public boolean CanBePickedUp(Item item) + { + if (item.getClass().toString().endsWith("Robot")) + return false; + else + return super.CanBePickedUp(item); + } + +public void Erase() + { + super.Erase(); + devices = null; + } + +} + diff --git a/src/com/droidquest/items/Ghost.java b/src/com/droidquest/items/Ghost.java new file mode 100644 index 0000000..4d341a2 --- /dev/null +++ b/src/com/droidquest/items/Ghost.java @@ -0,0 +1,193 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.levels.Level; + +public class Ghost extends Item +{ +int animationState = 0; // 0=Right, 1=Down, 2=Left, 3=Up +// x values are 42, 154, 266, 378 +// y values are 58, 186, 314 + +transient boolean searched=false; +transient Item robot[]; + +public Ghost(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width = 28; height = 32; + grabbable = false; + GenerateIcons(); + } + +public void GenerateIcons() + { + robot = new Item[4]; + icons = new ImageIcon[4]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[3]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + for (int a=0; a<4; a++) + { + try + { + g = icons[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.red); + g.fillArc(0,0,28,32,0,180); + g.fillRect(0,16,28,16); + g.setColor(Color.white); + g.fillOval(4,8,8,8); + g.fillOval(16,8,8,8); + g.setColor(Color.black); + switch(a) + { + case 0: // Right + g.fillOval(9,10,4,4); + g.fillOval(21,10,4,4); + break; + case 1: // Down + g.fillOval(7,12,4,4); + g.fillOval(19,12,4,4); + break; + case 2: // Left + g.fillOval(4,10,4,4); + g.fillOval(16,10,4,4); + break; + case 3: // Up + g.fillOval(7,8,4,4); + g.fillOval(19,8,4,4); + break; + } + } + currentIcon = icons[0].getImage(); + } + +public void Animate() + { + // Positions: There are 4x3=12 "nodes" where the ghost travels to + // and from. Every time the ghost reaches a node position, it looks + // around for any robots in the area. If it sees a robot it then + // heads in that direction. Robots that are hit are put in the + // penalty box and drained of energy. If no robot is found it moves + // in a random direction. + + if (!searched) + { + int rcounter = 0; + for (int a=0; a0) + animationState=1; + else + animationState=3; + } + else + { + if (dx>0) + animationState=0; + else + animationState=2; + } + } + } + } + } + if (!decision) + { + boolean good; + int backwards = (animationState+2)%4; + do + { + good = true; + animationState = level.random.nextInt(4); + if (animationState==0 && x==378) good=false; + if (animationState==1 && y==304) good=false; + if (animationState==2 && x== 42) good=false; + if (animationState==3 && y== 48) good=false; + if (animationState==backwards) good=false; + } + while (!good); + } + } + + switch (animationState) + { + case 0: // Right + MoveRight(4); + break; + case 1: // Down + MoveDown(4); + break; + case 2: // Left + MoveLeft(4); + break; + case 3: // Up + MoveUp(4); + break; + } + currentIcon = icons[animationState].getImage(); + + for (int a=0; a<4; a++) + if (robot[a] != null) + if (Overlaps(robot[a])) + { + robot[a].charge=0; + level.PlaySound(room, Level.DISCHARGESOUND); + robot[a].x = 16*28+14; + robot[a].y = 32; + } + } +} diff --git a/src/com/droidquest/items/Handle.java b/src/com/droidquest/items/Handle.java new file mode 100644 index 0000000..6779572 --- /dev/null +++ b/src/com/droidquest/items/Handle.java @@ -0,0 +1,93 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Handle extends Item +{ + // Handle used to pull sliding wall + + public Handle(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=12; + GenerateIcons(); + } + + public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(0,4,16,4); + g.fillRect(16,2,12,8); + g.fillRect(20,0,4,12); + currentIcon = icons[0].getImage(); + } + + public boolean CanBePickedUp(Item item) + { + if (item != level.player) return false; + PicksUp(item); + level.player = this; + return false; + } + + public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_RIGHT) + { + if (x<15*28) + { + room.SetMaterial(x/28-12, 4, 0); + MoveRight(28); + room.SetMaterial(x/28-1, 4, 8); + } + } + + if (e.getKeyCode() == e.VK_LEFT) + { + if (x>13*28) + { + room.SetMaterial(x/28-13, 4, 8); + room.SetMaterial(x/28-1, 4, 0); + MoveLeft(28); + } + } + + if (e.getKeyCode() == e.VK_SPACE) + { + level.player=carrying; + Drops(); + room.SetMaterial(1, 4, 8); + room.SetMaterial(2, 4, 8); + room.SetMaterial(13, 4, 0); + room.SetMaterial(14, 4, 0); + x=13*28; + } + return false; + } + + } + diff --git a/src/com/droidquest/items/Hexagon.java b/src/com/droidquest/items/Hexagon.java new file mode 100644 index 0000000..7c1915b --- /dev/null +++ b/src/com/droidquest/items/Hexagon.java @@ -0,0 +1,50 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Hexagon extends Item +{ +Color color; + +public Hexagon(int X, int Y, Room r, Color c) + { + x=X; y=Y; room=r; + width=28; height=28; + color = c; + editable=true; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(color); + int[] xp = { 7, 21, 27, 21, 7, 0}; + int[] yp = { 0, 0, 14, 27, 27, 14}; + g.fillPolygon(xp,yp,6); + currentIcon = icons[0].getImage(); + } + +} diff --git a/src/com/droidquest/items/HiddenCamera.java b/src/com/droidquest/items/HiddenCamera.java new file mode 100644 index 0000000..85ef835 --- /dev/null +++ b/src/com/droidquest/items/HiddenCamera.java @@ -0,0 +1,22 @@ +package com.droidquest.items; + +import java.awt.Graphics; + +import javax.swing.JPanel; + +import com.droidquest.Room; + +public class HiddenCamera extends Item +{ +public HiddenCamera(Room r) + { + x=0; y=0; + room = r; + width=0; height=0; + grabbable=false; + } + +public void Draw(Graphics g, JPanel jp) + {} + +} diff --git a/src/com/droidquest/items/Initializer.java b/src/com/droidquest/items/Initializer.java new file mode 100644 index 0000000..7e511c1 --- /dev/null +++ b/src/com/droidquest/items/Initializer.java @@ -0,0 +1,13 @@ +package com.droidquest.items; + + +public class Initializer extends Item +{ +public Initializer() + { + width=0; height=0; x=0; y=0; room=null; + } + +public void Init() {} + +} \ No newline at end of file diff --git a/src/com/droidquest/items/Item.java b/src/com/droidquest/items/Item.java new file mode 100644 index 0000000..a159b36 --- /dev/null +++ b/src/com/droidquest/items/Item.java @@ -0,0 +1,712 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; + +import javax.swing.ImageIcon; +import javax.swing.JPanel; + +import com.droidquest.Room; +import com.droidquest.Wire; +import com.droidquest.devices.Device; +import com.droidquest.levels.Level; +import com.droidquest.materials.ChipTrash; + +public class Item implements Serializable, Cloneable +{ + public transient static Level level; + public transient Item carrying; // What this item is carrying. + public transient Item carriedBy; // What is carrying this item. + public transient Image currentIcon; // Current image of this item. + public transient ImageIcon[] icons; // Array of images for this item + public transient Room room; // Room this item is currently in + public transient Color outline; // Null, White, Grey + public transient int automove; // 0=normal movement, 1=Move to autoX,autoY, 2=Move in autoX,autoY + public transient int autoX; // Destination of automovement + public transient int autoY; // Destination of automovement + public Room InternalRoom = null; // Room inside this item, if any. + + protected int repeating=0; // Keyboard repeat. + public int charge =0; // Battery Charge of this item, if any. + public boolean grabbable=true; // Can this item be picked up? + public int x,y; // Position X,Y + protected int orgX, orgY; // origin, within graphics + protected int width, height; // width & height of object from origin + public Rectangle leftPortal; + public Rectangle rightPortal; + public Rectangle upPortal; + public Rectangle downPortal; + public boolean editable=false; + + public Item() + { + x=0; y=0; + } + + public Item(String filename, int X, int Y, Room r) + { + x=X; y=Y; + room = r; + grabbable = true; + // icons = new Image[1]; + // icons[0]=Toolkit.getDefaultToolkit().getImage(filename); + icons = new ImageIcon[1]; + icons[0]=new ImageIcon(filename); + currentIcon = icons[0].getImage(); + } + + public void writeRef(ObjectOutputStream s) throws IOException + { + s.writeInt(level.items.indexOf(carrying)); + s.writeInt(level.items.indexOf(carriedBy)); + s.writeInt(level.rooms.indexOf(room)); + s.writeInt(level.rooms.indexOf(InternalRoom)); + } + + public void readRef(ObjectInputStream s) throws IOException + { + carrying = level.FindItem(s.readInt()); + carriedBy = level.FindItem(s.readInt()); + room = level.FindRoom(s.readInt()); + InternalRoom = level.FindRoom(s.readInt()); + GenerateIcons(); + } + + public Image getIcon() + { + return currentIcon; + } + + public int getWidth() + { + return width; + } + + public int getHeight() + { + return height; + } + + public int getX() + { + return (x-orgX); + } + + public int getY() + { + return (y-orgY); + } + + public Room getRoom() + { + return room; + } + + public void PicksUp(Item item) + { + // This picks up an item + if (carrying == null) + if (item.CanBePickedUp(this) == true && item.carriedBy == null) + { + carrying = item; + item.carriedBy = this; + item.x -= x; + item.y -= y; + item.outline=Color.white; + level.PlaySound(room,Level.PICKUPSOUND); + } + } + + public void Drops() + { + // This drops the carried item + if (carrying != null) + { + Item item = carrying; + carrying.carriedBy = null; + Dimension d = GetXY(); + carrying.x += d.width; + carrying.y += d.height; + if (carrying.x<0) + { + carrying.x += 560; + carrying.room = room.leftRoom; + } + if (carrying.y<0) + { + carrying.y += 384; + carrying.room = room.upRoom; + } + if (carrying.x>559) + { + carrying.x -= 560; + carrying.room = room.rightRoom; + } + if (carrying.y>383) + { + carrying.y -= 384; + carrying.room = room.downRoom; + } + carrying = null; + outline=new Color(128,128,128); + item.IsDropped(); + level.PlaySound(room, Level.DROPSOUND); + } + } + + public void IsDropped() + { + if (!editable) return; + + int bigXl = (x)/28; + int bigXr = (x+width-1)/28; + int bigYt = (y)/32; + int bigYb = (y+height-1)/32; + + if (bigXr>19) bigXr=19; + if (bigYb>11) bigYb=11; + + for (int a=bigYt; a<=bigYb; a++) + for (int b=bigXl; b<=bigXr; b++) + { + if (room.MaterialArray[a][b] instanceof ChipTrash) + { + SetRoom(null); // Cheap way to remove the wires; + level.items.removeElement(this); + level.PlaySound(room,Level.DISCHARGESOUND); + return; + } + } + + return; + } + + public void SetRoom(Room r) + { + // Goes through recursively from Item to carried item to carried + // item.... Puts all items in the same room. + Room cr = r; + if (r != room) + if (isDevice()) + { + Device device = (Device) this; + for (int a = 0; a=560) { cr=r.rightRoom; x-=560; } + if (y>=384) { cr=r.downRoom; y-=384; } + } + room = cr; + automove=0; + if (carrying != null) + carrying.SetRoom(cr); + } + + public boolean KeyUp(KeyEvent e) + { + // Handles keybord input. + // Return TRUE if repaint is needed (usually for movement) + return false; + } + + public boolean KeyDown(KeyEvent e) + { + // Handles keybord input. + // Return TRUE if repaint is needed (usually for movement) + return false; + } + + public void MouseClick(MouseEvent e) + { + int button=0; + if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) + button = 1; + if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) + button = 3; + + if (button==1) + { + if (e.getClickCount()==1) + { + autoX = e.getX() - width/2; + autoY = e.getY() - height/2; + autoX -= autoX%2; // Even numbered pixel only! + autoY -= autoY%2; + automove = 1; + } + else if (e.getClickCount()==2) + { + int dx = e.getX() - width/2 - x; + int dy = e.getY() - height/2 - y; + if (Math.abs(dx) > Math.abs(dy)) + { + autoY=0; autoX=28; + if (dx<0) autoX=-28; + automove=2; + } + else + { + autoX=0; autoY=32; + if (dy<0) autoY=-32; + automove=2; + } + } + } + + if (button==3) + { + KeyEvent k = new KeyEvent(e.getComponent(), e.getID(), + e.getWhen(), 0, + KeyEvent.VK_SPACE,' '); + KeyUp(k); + } + + } + + public void MoveUp(int dist) + { + int bigXl = x/28; + int bigXr = (x+getWidth()-1)/28; + int bigY = (y-dist)/32; + if ( (level.materialAt(bigXl,bigY,room).Passable(this) == false) + || (level.materialAt(bigXr,bigY,room).Passable(this) == false) ) + { + automove=0; + int newDist = y - (bigY+1)*32; + y = (bigY+1)*32; + ItemEffectsMaterials(); + return; + } + y=y-dist; + if (y<0) + { + if (room.getUpRoom(this) != null) + { // change Rooms + y=y+384; + SetRoom(room.getUpRoom(this)); + } + else if (this==level.player && room.portalItem != null) + { // Exit item, Player only + Dimension d = room.portalItem.GetXY(); + x = d.width + (room.portalItem.width - width)/2; + y = d.height + (room.portalItem.height - height)/2; + SetRoom(room.portalItem.room); + MoveUp(dist); + } + else + { // stop at top + y+=384; + automove=0; + } + } + ItemEffectsMaterials(); + } + + public void MoveDown(int dist) + { + int bigXl = x/28; + int bigXr = (x+getWidth()-1)/28; + int bigY = (y+getHeight()-1+dist)/32; + if ( (level.materialAt(bigXl,bigY,room).Passable(this) == false) + || (level.materialAt(bigXr,bigY,room).Passable(this) == false) ) + { + automove=0; + int newDist = bigY*32 - getHeight() - y; + y += newDist; + ItemEffectsMaterials(); + return; + } + y=y+dist; + if (y>383) + { + if (room.getDownRoom(this) != null) + { // change Rooms + y=y-384; + SetRoom(room.getDownRoom(this)); + } + else if (this==level.player && room.portalItem != null) + { // Exit item, GameCursor only + Dimension d = room.portalItem.GetXY(); + x = d.width + (room.portalItem.width - width)/2; + y = d.height + (room.portalItem.height - height)/2; + SetRoom(room.portalItem.room); + MoveDown(dist); + } + else + { // stop at bottom + y-=384; + automove=0; + } + } + ItemEffectsMaterials(); + } + + public void MoveLeft(int dist) + { + int bigX = (x-dist)/28; + int bigYt = y/32; + int bigYb = (y+getHeight()-1)/32; + if ( (level.materialAt(bigX,bigYt,room).Passable(this) == false) + || (level.materialAt(bigX,bigYb,room).Passable(this) == false) ) + { + automove=0; + int newDist = x - (bigX+1)*28 ; + x = (bigX+1)*28; + ItemEffectsMaterials(); + return; + } + x=x-dist; + if (x<0) + { + if (room.getLeftRoom(this) != null) + { // change Rooms + x=x+560; + SetRoom(room.getLeftRoom(this)); + } + else if (this==level.player && room.portalItem != null) + { // Exit item, GameCursor only + Dimension d = room.portalItem.GetXY(); + x = d.width + (room.portalItem.width - width)/2; + y = d.height + (room.portalItem.height - height)/2; + SetRoom(room.portalItem.room); + MoveLeft(dist); + } + else + { // stop at Left + x+=560; + automove=0; + } + } + ItemEffectsMaterials(); + } + + public void MoveRight(int dist) + { + int bigX = (x+getWidth()-1+dist)/28; + int bigYt = y/32; + int bigYb = (y+getHeight()-1)/32; + // if (bigX<20 && bigYb<20 && bigYt>=0) + if ( (level.materialAt(bigX,bigYt,room).Passable(this) == false) + || (level.materialAt(bigX,bigYb,room).Passable(this) == false) ) + { + automove=0; + int newDist = bigX*28 - getWidth()- x; + x += newDist; + ItemEffectsMaterials(); + return; + } + x=x+dist; + if (x>559) + { + if (room.getRightRoom(this) != null) + { // change Rooms + x=x-560; + SetRoom(room.getRightRoom(this)); + } + else if (this==level.player && room.portalItem != null) + { // Exit item, GameCursor only + Dimension d = room.portalItem.GetXY(); + x = d.width + (room.portalItem.width - width)/2; + y = d.height + (room.portalItem.height - height)/2; + SetRoom(room.portalItem.room); + MoveRight(dist); + } + else + { // stop at Right + x-=560; + automove=0; + } + } + ItemEffectsMaterials(); + } + + public void MoveUp(boolean nudge) + { + int dist = 32; + if (nudge) dist = 2; + MoveUp(dist); + } + + public void MoveDown(boolean nudge) + { + int dist = 32; + if (nudge) dist = 2; + MoveDown(dist); + } + + public void MoveLeft(boolean nudge) + { + int dist = 28; + if (nudge) dist = 2; + MoveLeft(dist); + } + + public void MoveRight(boolean nudge) + { + int dist = 28; + if (nudge) dist = 2; + MoveRight(dist); + } + + public void Animate() + { + if (automove==1 && room == null) + automove=0; + if (automove==1) + { + int dx = autoX - x; + int dy = autoY - y; + if (dx==0 && dy==0) automove=0; + if (dx<-28) dx =-28; + if (dx>28) dx=28; + if (dy<-32) dy=-32; + if (dy>32) dy=32; + if (dx>0) MoveRight(dx); + if (dx<0) MoveLeft(-dx); + if (dy>0) MoveDown(dy); + if (dy<0) MoveUp(-dy); + } + if (automove==2) + { + if (autoX>0) MoveRight(autoX); + if (autoX<0) MoveLeft(-autoX); + if (autoY>0) MoveDown(autoY); + if (autoY<0) MoveUp(-autoY); + } + } + + public void Decorate() + { + } + + public void GenerateIcons() + { + // This is where the icons[] array is filled with ImageIcons, and + // the ImageIcons are painted. Depending on the Item, this can be + // done either once during initialization, or once per Animation + // phase. + } + + public boolean CanBePickedUp(Item i) + { + // Returns True if THIS Item can be picked up by Item i. + return grabbable; + } + + private void ItemEffectsMaterials() + { + // called after every Move() function + // + // Checks the materials touched by this item, and calls their + // Material.TouchedByItem(Item) + + if (room == null) return; + + Dimension d = GetXY(); + + int bigXl = (d.width)/28; + int bigXr = (d.width+width-1)/28; + int bigYt = (d.height)/32; + int bigYb = (d.height+height-1)/32; + + if (bigXr>19) bigXr=19; + if (bigYb>11) bigYb=11; + + for (int a=bigYt; a<=bigYb; a++) + for (int b=bigXl; b<=bigXr; b++) + if (a>=0 && a<12 && b>=0 &&b<20) + room.MaterialArray[a][b].TouchedByItem(this); + + if (carrying != null) + carrying.ItemEffectsMaterials(); + + + } + + public Dimension GetXY() + { + // Recursively goes up the carrying tree to figure out the XY + // coordinates of an item. + + if (carriedBy != null) + { + Dimension d = carriedBy.GetXY(); + d.width += x; + d.height += y; + return d; + } + else + return new Dimension(x,y); + } + + public void Draw(Graphics g, JPanel jp) + { + Dimension d = GetXY(); + if (currentIcon != null) + g.drawImage(currentIcon, d.width-orgX, d.height-orgY, jp); + else + System.out.println("Cannot draw " + getClass()); + if (outline != null) + { + g.setColor(outline); + g.drawRect(d.width,d.height, width+1, height+1); + g.drawRect(d.width+1,d.height+1, width-1, height-1); + outline=null; + } + } + + public void Draw(Graphics g, int X, int Y, JPanel jp) + { + g.drawImage(currentIcon, X - orgX, Y - orgY, jp); + } + + public boolean Overlaps(Item testItem) + { + boolean overlap = false; + if (this!=testItem && this.room == testItem.room) + { + overlap = true; + Dimension d1 = GetXY(); + Dimension d2 = testItem.GetXY(); + if (this.carrying == testItem) {overlap=false;} + if (this == testItem.carrying) {overlap=false;} + if (d1.width + this.width < d2.width) {overlap=false;} + if (d2.width + testItem.width < d1.width) {overlap=false;} + if (d1.height + this.height < d2.height) {overlap=false;} + if (d2.height + testItem.height < d1.height) {overlap=false;} + } + return overlap; + } + + public boolean RightEnterOverlap(Item item) + { + boolean result = true; + if (leftPortal!= null) + { + if (item.x < x + leftPortal.x) result = false; + if (item.x > x + leftPortal.x + leftPortal.width) result = false; + if (item.y < y + leftPortal.y) result = false; + if (item.y > y + leftPortal.y + leftPortal.height) result = false; + } + else + result = false; + if (OverWall()) result=false; + return result; + } + + public boolean DownEnterOverlap(Item item) + { + boolean result = true; + if (upPortal!=null) + { + if (item.x < x + upPortal.x) result = false; + if (item.x > x + upPortal.x + upPortal.width) result = false; + if (item.y < y + upPortal.y) result = false; + if (item.y > y + upPortal.y + upPortal.height) result = false; + } + else + result = false; + if (OverWall()) result=false; + return result; + } + + public boolean LeftEnterOverlap(Item item) + { + boolean result = true; + if (leftPortal!=null) + { + if (item.x < x + rightPortal.x) result = false; + if (item.x > x + rightPortal.x + rightPortal.width) result = false; + if (item.y < y + rightPortal.y) result = false; + if (item.y > y + rightPortal.y + rightPortal.height) result = false; + } + else + result = false; + if (OverWall()) result=false; + return result; + } + + public boolean UpEnterOverlap(Item item) + { + boolean result = true; + if (downPortal!=null) + { + if (item.x < x + downPortal.x) result = false; + if (item.x > x + downPortal.x + downPortal.width) result = false; + if (item.y < y + downPortal.y) result = false; + if (item.y > y + downPortal.y + downPortal.height) result = false; + } + else + result = false; + if (OverWall()) result=false; + return result; + } + + public boolean isDevice() + { + return false; + } + + public Object clone() + { + Object newObject = null; + try + { + newObject = super.clone(); + } + catch (CloneNotSupportedException e) {} + // if (newObject instanceof Device) + // { + // Device newDevice = (Device) newObject; + // newDevice.ports = null; + // newDevice.GenerateIcons(); + // } + return newObject; + } + + public void Erase() + { + carrying = null; + carriedBy = null; + room = null; + currentIcon=null; + icons = null; + InternalRoom = null; + } + + public boolean OverWall() + { + Dimension d = GetXY(); + int bigXL = (d.width+width/2-14)/28; + int bigXR = (d.width+width/2+14)/28; + int bigYT = (d.height+height/2-16)/32; + int bigYB = (d.height+height/2+16)/32; + if (bigXR>19) bigXR=19; + if (bigYB>11) bigYB=11; + boolean flag = false; + for (int Y=bigYT; Y<=bigYB; Y++) + for (int X=bigXL; X<=bigXR; X++) + if (!room.MaterialArray[Y][X].passable) + flag=true; + return flag; + } + +} diff --git a/src/com/droidquest/items/Key.java b/src/com/droidquest/items/Key.java new file mode 100644 index 0000000..c7915a7 --- /dev/null +++ b/src/com/droidquest/items/Key.java @@ -0,0 +1,51 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Key extends Item +{ + // Generic Key, defined by it's color. + + public Color color; + + public Key(int X, int Y, Room r, Color c) + { + x=X; y=Y; room=r; color = c; + width=26; height=8; + GenerateIcons(); + } + + public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(color); + g.fillRect(0,0,6,8); + g.fillRect(0,2,26,2); + g.fillRect(0,4,22,2); + g.fillRect(16,6,2,2); + currentIcon = icons[0].getImage(); + } + + } diff --git a/src/com/droidquest/items/Magnet.java b/src/com/droidquest/items/Magnet.java new file mode 100644 index 0000000..20b3687 --- /dev/null +++ b/src/com/droidquest/items/Magnet.java @@ -0,0 +1,52 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Magnet extends Item +{ +public Magnet(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=20; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(0,4,8,12); + g.fillRect(4,2,8,6); + g.fillRect(4,12,8,6); + g.fillRect(8,0,20,6); + g.fillRect(8,14,20,6); + g.setColor(Color.black); + g.fillRect(20,0,4,6); + g.fillRect(20,14,4,6); + currentIcon = icons[0].getImage(); + } + +} + diff --git a/src/com/droidquest/items/MasterRobot.java b/src/com/droidquest/items/MasterRobot.java new file mode 100644 index 0000000..0454dae --- /dev/null +++ b/src/com/droidquest/items/MasterRobot.java @@ -0,0 +1,75 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; + +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.Bumper; +import com.droidquest.devices.Grabber; +import com.droidquest.devices.Thruster; + +public class MasterRobot extends GenericRobot +{ +private int scan; + +public MasterRobot(int X, int Y, Room r) + { + super(X,Y,r,Color.blue); + scan=0; + Animate(); + devices[0] = new Thruster(176,16,InternalRoom,Port.ROT_UP,Color.white); + devices[1] = new Thruster(476,128,InternalRoom,Port.ROT_RIGHT,Color.white); + devices[2] = new Thruster(356,336,InternalRoom,Port.ROT_DOWN,Color.white); + devices[3] = new Thruster(32,236,InternalRoom,Port.ROT_LEFT,Color.white); + devices[4] = new Bumper(396,16,InternalRoom,Port.ROT_UP,Color.white); + devices[5] = new Bumper(480,256,InternalRoom,Port.ROT_RIGHT,Color.white); + devices[6] = new Bumper(128,330,InternalRoom,Port.ROT_DOWN,Color.white); + devices[7] = new Bumper(28,134,InternalRoom,Port.ROT_LEFT,Color.white); + devices[8] = new Antenna(64,70,InternalRoom,Color.white); + devices[9] = new Grabber(126,44,InternalRoom,Color.white); + for (int a=0; a<10; a++) + level.items.addElement(devices[a]); + + } + +public void Decorate() + { + super.Decorate(); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + g.setColor(Color.black); + g.fillRect(orgX+16,orgY+12,26,20); + g.setColor(new Color(255,128,0)); + + switch(scan) + { + case 0: + g.fillRect(orgX+28,orgY+18,2,8); + scan=1; + break; + case 1: + g.fillRect(orgX+24,orgY+16,10,12); + g.setColor(Color.black); + g.fillRect(orgX+26,orgY+18,6,8); + scan=2; + break; + case 2: + g.fillRect(orgX+20,orgY+14,18,16); + g.setColor(Color.black); + g.fillRect(orgX+22,orgY+16,14,12); + scan=0; + break; + } + } + +} diff --git a/src/com/droidquest/items/MazeControl.java b/src/com/droidquest/items/MazeControl.java new file mode 100644 index 0000000..862bb7f --- /dev/null +++ b/src/com/droidquest/items/MazeControl.java @@ -0,0 +1,125 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.decorations.TextBox; + +public class MazeControl extends Item +{ +static int mazeWidth=4; +static int mazeHeight=2; +int direction; +public static final int DIR_UP = 0; +public static final int DIR_RIGHT = 1; +public static final int DIR_DOWN = 2; +public static final int DIR_LEFT = 3; + +public MazeControl(int X, int Y, Room r, int dir) + { + x=X; y=Y; + room = r; + width=26; height=26; + direction = dir; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + switch(direction) + { + case DIR_UP: + g.fillRect(12,0,2,2); + g.fillRect(10,2,6,2); + g.fillRect(8,4,10,2); + g.fillRect(6,6,14,2); + g.fillRect(4,8,18,2); + g.fillRect(2,10,22,2); + g.fillRect(0,12,26,2); + g.fillRect(10,14,6,12); + break; + case DIR_RIGHT: + g.fillRect(24,12,2,2); + g.fillRect(22,10,2,6); + g.fillRect(20,8,2,10); + g.fillRect(18,6,2,14); + g.fillRect(16,4,2,18); + g.fillRect(14,2,2,22); + g.fillRect(12,0,2,26); + g.fillRect(0,10,12,6); + break; + case DIR_DOWN: + g.fillRect(12,24,2,2); + g.fillRect(10,22,6,2); + g.fillRect(8,20,10,2); + g.fillRect(6,18,14,2); + g.fillRect(4,16,18,2); + g.fillRect(2,14,22,2); + g.fillRect(0,12,26,2); + g.fillRect(10,0,6,12); + break; + case DIR_LEFT: + g.fillRect(0,12,2,2); + g.fillRect(2,10,2,6); + g.fillRect(4,8,2,10); + g.fillRect(6,6,2,14); + g.fillRect(8,4,2,18); + g.fillRect(10,2,2,22); + g.fillRect(12,0,2,26); + g.fillRect(14,10,12,6); + break; + } + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item item) + { + switch (direction) + { + case DIR_UP: + if (mazeHeight==1) return false; + mazeHeight--; + break; + case DIR_DOWN: + mazeHeight++; + break; + case DIR_LEFT: + if (mazeWidth==1) return false; + mazeWidth--; + break; + case DIR_RIGHT: + mazeWidth++; + break; + } + TextBox tb = (TextBox) room.textBoxes.elementAt(1); + tb.textString = mazeWidth + "x" + mazeHeight; + tb.x = (560 - 12*tb.textString.length())/2; + + return false; + } + +} + diff --git a/src/com/droidquest/items/MazeCreator.java b/src/com/droidquest/items/MazeCreator.java new file mode 100644 index 0000000..fb9d6a2 --- /dev/null +++ b/src/com/droidquest/items/MazeCreator.java @@ -0,0 +1,100 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class MazeCreator extends Button +{ +public MazeCreator(int X, int Y, Room r) + { + super(X,Y,r,Color.blue); + } + +public boolean CanBePickedUp(Item item) + { + Room mazeEntrance=null; + for (int a=0; a28 && x+dx<(19*28)) + x+=dx; + if (y+dy>32 && y+dy<(11*32)) + y+=dy; + if (animationState==1) + { + eb.x=x; eb.y=y; + eb.room = room; + room = null; + } + if (animationState==2) + { + room = eb.room; + eb.room = null; + } + if (animationState==50) + animationState=0; + } + } +} + + diff --git a/src/com/droidquest/items/OrangeRobot.java b/src/com/droidquest/items/OrangeRobot.java new file mode 100644 index 0000000..01a6d9c --- /dev/null +++ b/src/com/droidquest/items/OrangeRobot.java @@ -0,0 +1,78 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; + +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.Bumper; +import com.droidquest.devices.Grabber; +import com.droidquest.devices.Thruster; + +public class OrangeRobot extends GenericRobot +{ +public OrangeRobot(int X, int Y, Room r) + { + super(X,Y,r,new Color(255,128,0)); + Animate(); + devices[0] = new Thruster(176,16,InternalRoom,Port.ROT_UP,Color.white); + devices[1] = new Thruster(476,128,InternalRoom,Port.ROT_RIGHT,Color.white); + devices[2] = new Thruster(356,336,InternalRoom,Port.ROT_DOWN,Color.white); + devices[3] = new Thruster(32,236,InternalRoom,Port.ROT_LEFT,Color.white); + devices[4] = new Bumper(396,16,InternalRoom,Port.ROT_UP,Color.white); + devices[5] = new Bumper(480,256,InternalRoom,Port.ROT_RIGHT,Color.white); + devices[6] = new Bumper(128,330,InternalRoom,Port.ROT_DOWN,Color.white); + devices[7] = new Bumper(28,134,InternalRoom,Port.ROT_LEFT,Color.white); + devices[8] = new Antenna(64,70,InternalRoom,Color.white); + devices[9] = new Grabber(126,44,InternalRoom,Color.white); + for (int a=0; a<10; a++) + level.items.addElement(devices[a]); + + } + +public void Decorate() + { + super.Decorate(); + Graphics g; + int cx, cy, cc; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + + g.setColor(Color.black); + g.fillRect(22,36,42,20); + + for (int a=0; a<20; a++) + { + cx = level.random.nextInt(41)+22; + cy = level.random.nextInt(19)+36; + cc = level.random.nextInt(7); + switch (cc) + { + case 0: g.setColor(Color.white); + break; + case 1: g.setColor(Color.red); + break; + case 2: g.setColor(new Color(255,128,0)); + break; + case 3: g.setColor(Color.yellow); + break; + case 4: g.setColor(Color.green); + break; + case 5: g.setColor(Color.blue); + break; + case 6: g.setColor(Color.magenta); + break; + } + g.fillRect(cx,cy,2,2); + } + } + +} diff --git a/src/com/droidquest/items/PC16Button.java b/src/com/droidquest/items/PC16Button.java new file mode 100644 index 0000000..a203ab1 --- /dev/null +++ b/src/com/droidquest/items/PC16Button.java @@ -0,0 +1,62 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.devices.Prototype16Chip; +import com.droidquest.levels.Level; + +public class PC16Button extends Item +{ +public PC16Button(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=26; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.blue); + g.fillRect(8,0,12,26); + g.fillRect(4,2,20,22); + g.fillRect(0,4,28,18); + g.setColor(Color.black); + g.fillRect(8,6,12,14); + g.fillRect(4,8,20,10); + g.setColor(Color.blue); + g.fillRect(12,8,4,10); + g.fillRect(8,10,12,6); + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item i) + { + Prototype16Chip newPC = new Prototype16Chip(228, 160, room); + level.items.addElement(newPC); + level.PlaySound(room,Level.CHARGESOUND); + return false; + } + +} diff --git a/src/com/droidquest/items/PC32Button.java b/src/com/droidquest/items/PC32Button.java new file mode 100644 index 0000000..0c0001d --- /dev/null +++ b/src/com/droidquest/items/PC32Button.java @@ -0,0 +1,63 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.devices.Prototype32Chip; +import com.droidquest.levels.Level; + +public class PC32Button extends Item +{ +public PC32Button(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=26; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.blue); + g.fillRect(8,0,12,26); + g.fillRect(4,2,20,22); + g.fillRect(0,4,28,18); + g.setColor(Color.black); + g.fillRect(8,6,12,14); + g.fillRect(4,8,20,10); + g.setColor(Color.blue); + g.fillRect(12,8,4,10); + g.fillRect(8,10,12,6); + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item i) + { + Prototype32Chip newPC = new Prototype32Chip(228, 160, room); + level.items.addElement(newPC); + level.PlaySound(room,Level.CHARGESOUND); + return false; + } + +} + diff --git a/src/com/droidquest/items/PCButton.java b/src/com/droidquest/items/PCButton.java new file mode 100644 index 0000000..255a211 --- /dev/null +++ b/src/com/droidquest/items/PCButton.java @@ -0,0 +1,62 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.devices.PrototypeChip; +import com.droidquest.levels.Level; + +public class PCButton extends Item +{ +public PCButton(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=26; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.blue); + g.fillRect(8,0,12,26); + g.fillRect(4,2,20,22); + g.fillRect(0,4,28,18); + g.setColor(Color.black); + g.fillRect(8,6,12,14); + g.fillRect(4,8,20,10); + g.setColor(Color.blue); + g.fillRect(12,8,4,10); + g.fillRect(8,10,12,6); + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item i) + { + PrototypeChip newPC = new PrototypeChip(228, 160, room); + level.items.addElement(newPC); + level.PlaySound(room,Level.CHARGESOUND); + return false; + } + +} diff --git a/src/com/droidquest/items/Pellet.java b/src/com/droidquest/items/Pellet.java new file mode 100644 index 0000000..fafca13 --- /dev/null +++ b/src/com/droidquest/items/Pellet.java @@ -0,0 +1,80 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Pellet extends Item +{ +transient static int pelletCount = 0; +transient boolean counted = false; + +public Pellet(int X, int Y, Room r) + { + x=X; y=Y; room = r; + width = 28; height = 28; + pelletCount ++; + } + +public void GenerateIcons() + { + if (!counted) + { + int index = level.items.indexOf(this); + if (!(level.items.elementAt(index-1) instanceof Pellet)) + pelletCount=0; + counted = true; + pelletCount++; + } + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillOval(0,0,width,height); + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item item) + { + if (item instanceof GenericRobot) + { + level.items.removeElement(this); + pelletCount--; + if (pelletCount==0) + { + room.SetMaterial(15,1,0); + room.SetMaterial(15,2,0); + room.SetMaterial(15,5,0); + room.SetMaterial(15,6,0); + room.SetMaterial(15,9,0); + room.SetMaterial(15,10,0); + for (int a=0; a=0 && behavior < pounce) + if (protect.length >0 && level.player.room == room) + { + for (int p=0; p= x1 + && level.player.x <= x2 + && level.player.y >= y1 + && level.player.y <= y2) + { + carryToX = x3; + carryToY = y3; + previousBehavior = behavior; + if (previousBehavior >= pounce) + previousBehavior = 0; + behavior=pounce; + } + } + } + + if (behavior >=0 && behavior < pounce) + { + if (x == goToX && y == goToY) + { + behavior++; + if (behavior==pounce) behavior=0; + goToX = pace[behavior*2]; + goToY = pace[behavior*2+1]; + } + else + { + if (x != goToX) + { + int diff = Math.abs(goToX - x); + int dir = diff / (goToX - x); + if (diff > 8) diff = 8; + MoveRight(diff * dir); + } + if (y != goToY) + { + int diff = Math.abs(goToY - y); + int dir = diff / (goToY - y); + if (diff > 8) diff = 8; + MoveDown(diff * dir); + } + } + } + else if (behavior == pounce) + { + if (level.player.room != room) + behavior = previousBehavior; + if (animation==0) + { + x=level.player.x; + y=level.player.y; + } + if (x != level.player.x) + { + int diff = Math.abs(level.player.x - x); + int dir = diff / (level.player.x - x); + if (diff > 50) diff /= 2; + MoveRight(diff * dir); + } + if (y != level.player.y) + { + int diff = Math.abs(level.player.y - y); + int dir = diff / (level.player.y - y); + if (diff > 50) diff /= 2; + MoveDown(diff * dir); + } + if (x == level.player.x && y == level.player.y) + { + PicksUp(level.player); +// if (level.player.carrying != null) +// level.player.Drops(); + behavior=drag; + } + } + else if (behavior == drag) + { + if (x == carryToX && y == carryToY) + { + Drops(); + behavior=previousBehavior; + } + else + { + if (x != carryToX) + { + int diff = Math.abs(carryToX - x); + int dir = diff / (carryToX - x); + if (diff > 8) diff = 8; + MoveRight(diff * dir); + } + if (y != carryToY) + { + int diff = Math.abs(carryToY - y); + int dir = diff / (carryToY - y); + if (diff > 8) diff = 8; + MoveDown(diff * dir); + } + } + } + } + + public GenericRobot PlayerInRobot(GenericRobot robot) + { + if (robot==null) + { + if (level.player.room.portalItem!=null) + { + if (level.player.room.portalItem.getClass().toString().endsWith("Robot")) + return (PlayerInRobot ((GenericRobot) level.player.room.portalItem)); + else return (null); + } + else + return (null); + } + else + if (robot.room.portalItem != null) + { + if (robot.room.portalItem.getClass().toString().endsWith("Robot")) + return (PlayerInRobot ((GenericRobot) robot.room.portalItem)); + else + return null; + } + else + { + if (robot.room == room) + return robot; + else + return null; + } + } + + public void MoveUp(int dist) + { + int newY = y-dist; + if (newY<0) + newY=0; + y=newY; + } + + public void MoveDown(int dist) + { + int newY = y+dist; + if (newY>383) + newY=383; + y=newY; + } + + public void MoveLeft(int dist) + { + int newX = x-dist; + if (newX<0) + newX=0; + x=newX; + } + + public void MoveRight(int dist) + { + int newX = x+dist; + if (newX>579) + newX=579; + x=newX; + } + + } + diff --git a/src/com/droidquest/items/Sentry3.java b/src/com/droidquest/items/Sentry3.java new file mode 100644 index 0000000..4fe862c --- /dev/null +++ b/src/com/droidquest/items/Sentry3.java @@ -0,0 +1,113 @@ +package com.droidquest.items; + +import com.droidquest.Room; + +public class Sentry3 extends Sentry +{ + // This sentry guards the Sewer Grate room. It walks up and down from + // position (2*28,2*32) to (2*28,8*32). It does not notice the player + // unless the player passes below y=11*32. Then it grabs the player if + // it goes above y=8*32. The Sentry drags the player down to y=11*32. If + // the player ever leaves the room, the Sentry forgets about the player. + + // Behavior values: + // 0=Move Down + // 1=Move Up + // 2=Attack + // 3=Drag + int carryToX; + boolean smart= false; // knows about the player + + public Sentry3(int X, int Y, Room r) + { + super(X,Y,r); + } + + public void Animate() + { + if (behavior<3) animation++; + if (animation==4) animation=0; + if (animation==3) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[animation].getImage(); + + if (level.player.room!=room) + { + if (smart) behavior = previousBehavior; + smart=false; + } + else + if (level.player.y>320) + { + carryToX = level.player.x; + smart=true; + } + + if (behavior<2 && smart) + if (level.player.y <= 256) + { + previousBehavior = behavior; + behavior=2; + } + + switch (behavior) + { + case 0: + if (y<256) MoveDown(8); + else behavior=1; + if (x<56) MoveRight(8); + if (x>56) MoveLeft(8); + break; + case 1: + if (y>64) MoveUp(8); + else behavior=0; + if (x<56) MoveRight(8); + if (x>56) MoveLeft(8); + break; + case 2: + if (level.player.room != room) + { + behavior = previousBehavior; + break; + } + int dx=level.player.x - x; + int dy=level.player.y - y; + if (dx<-50) dx=-50; + if (dx>50) dx=50; + if (dy<-50) dy=-50; + if (dy>50) dy=50; + if (dx<0) MoveLeft(-dx); + if (dx>0) MoveRight(dx); + if (dy<0) MoveUp(-dy); + if (dy>0) MoveDown(dy); + if (dx==0 && dy==0) + { + PicksUp(level.player); + behavior=3; + } + break; + case 3: + if (y>=320) + { + Drops(); + behavior = previousBehavior; + break; + } + else + { + if (y<312) + MoveDown(8); + else if (y<320) + MoveDown(320-y); + if (xcarryToX) + MoveLeft(8); + } + break; + } + } + + } + diff --git a/src/com/droidquest/items/SentryT1.java b/src/com/droidquest/items/SentryT1.java new file mode 100644 index 0000000..858e0d6 --- /dev/null +++ b/src/com/droidquest/items/SentryT1.java @@ -0,0 +1,179 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class SentryT1 extends Item +{ + // This sentry does nothing but pace back and forth in the first tutorial. + // It walks left and right, and switches directions when it hits a wall. + + // Behavior values: + // 0=Move Left + // 1=Move Right + + int animation = 0; // 0-3, 1 & 3 = icons[1] + int behavior = 0; // 0+ for pacing, until pounce and drag. -1=pin. + + public SentryT1(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=18; orgY = 30; + grabbable = false; + GenerateIcons(); + currentIcon = icons[0].getImage(); + } + + public void GenerateIcons() + { + icons = new ImageIcon[3]; + icons[0]= new ImageIcon(new BufferedImage(width,height+orgY,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height+orgY,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(width,height+orgY,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + + // 0 = Legs out + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height+orgY); + g.setColor(Color.white); + g.fillRect(8,0,12,6); + g.fillRect(12,6,4,6); + g.fillRect(8,12,12,24); + g.fillRect(4,16,20,18); + g.fillRect(0,20,28,10); + g.fillRect(4,36,8,4); + g.fillRect(4,36,4,6); + g.fillRect(0,40,4,8); + g.fillRect(16,36,8,4); + g.fillRect(20,36,4,6); + g.fillRect(24,40,4,8); + g.setColor(Color.black); + g.fillRect(4,22,4,6); + g.fillRect(20,22,4,6); + g.fillRect(8,20,4,2); + g.fillRect(16,20,4,2); + g.fillRect(8,28,4,2); + g.fillRect(16,28,4,2); + g.fillRect(12,18,4,2); + g.fillRect(12,30,4,2); + g.fillRect(12,22,4,6); + + + // 1 = legs mid + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height+orgY); + g.setColor(Color.white); + g.fillRect(8,0,12,6); + g.fillRect(12,6,4,6); + g.fillRect(8,12,12,28); + g.fillRect(4,16,20,18); + g.fillRect(0,20,28,10); + g.fillRect(4,40,8,2); + g.fillRect(16,40,8,2); + g.fillRect(4,40,4,8); + g.fillRect(20,40,4,8); + g.setColor(Color.black); + g.fillRect(4,22,4,6); + g.fillRect(20,22,4,6); + g.fillRect(8,20,4,2); + g.fillRect(16,20,4,2); + g.fillRect(8,28,4,2); + g.fillRect(16,28,4,2); + g.fillRect(12,18,4,2); + g.fillRect(12,30,4,2); + g.fillRect(12,22,4,6); + + + // 2 = legs in + try + { + g = icons[2].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height+orgY); + g.setColor(Color.white); + g.fillRect(8,0,12,6); + g.fillRect(12,6,4,36); + g.fillRect(8,12,12,24); + g.fillRect(4,16,20,18); + g.fillRect(0,20,28,10); + g.fillRect(8,40,4,8); + g.fillRect(16,40,4,8); + g.setColor(Color.black); + g.fillRect(4,22,4,6); + g.fillRect(20,22,4,6); + g.fillRect(8,20,4,2); + g.fillRect(16,20,4,2); + g.fillRect(8,28,4,2); + g.fillRect(16,28,4,2); + g.fillRect(12,18,4,2); + g.fillRect(12,30,4,2); + g.fillRect(12,22,4,6); + + if (animation==3) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[animation].getImage(); + + } + + public void Animate() + { + if (behavior<3) animation++; + if (animation==4) animation=0; + if (animation==3) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[animation].getImage(); + + int oldX; + switch (behavior) + { + case 0: + oldX=x; + MoveLeft(4); + if (oldX==x) behavior=1; + break; + case 1: + oldX=x; + MoveRight(4); + if (oldX==x) behavior=0; + break; + } + } + + } diff --git a/src/com/droidquest/items/SentryT2.java b/src/com/droidquest/items/SentryT2.java new file mode 100644 index 0000000..b2771c1 --- /dev/null +++ b/src/com/droidquest/items/SentryT2.java @@ -0,0 +1,95 @@ +package com.droidquest.items; + +import com.droidquest.Room; + +public class SentryT2 extends Sentry +{ + // This sentry guards a room from the toolbox being carried through it. + // It walks up and down, and pounces and drags if the cursor is + // carrying the toolbox. + + // Behavior values: + // 0=Walk down + // 1=Walk up + // 2=Attack + // 3=Drag back + + public SentryT2(int X, int Y, Room r) + { + super(X,Y,r); + } + + public void Animate() + { + if (behavior<3) animation++; + if (animation==4) animation=0; + if (animation==3) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[animation].getImage(); + + if (level.player.room==room) + if (level.player.x>=112) + if (level.player.carrying==level.toolbox) + { + previousBehavior = behavior; + behavior=2; + } + + switch (behavior) + { + case 0: + if (y<256) MoveDown(4); + else behavior=1; + if (x<56) MoveRight(4); + if (x>56) MoveLeft(4); + break; + case 1: + if (y>64) MoveUp(4); + else behavior=0; + if (x<56) MoveRight(4); + if (x>56) MoveLeft(4); + break; + case 2: + if (level.player.room != room) + { + behavior = previousBehavior; + break; + } + int dx=level.player.x - x; + int dy=level.player.y - y; + if (dx<-50) dx=-50; + if (dx>50) dx=50; + if (dy<-50) dy=-50; + if (dy>50) dy=50; + if (dx<0) MoveLeft(-dx); + if (dx>0) MoveRight(dx); + if (dy<0) MoveUp(-dy); + if (dy>0) MoveDown(dy); + if (dx==0 && dy==0) + { + PicksUp(level.player); + behavior=3; + } + break; + case 3: + if (x<=56 && y>=20 && y<=30) + { + Drops(); + behavior = 1; + break; + } + else + { + if (x>56) + MoveLeft(4); + if (y<20) + MoveDown(4); + if (y>30) + MoveUp(4); + } + break; + } + } + + } \ No newline at end of file diff --git a/src/com/droidquest/items/SkyGuard.java b/src/com/droidquest/items/SkyGuard.java new file mode 100644 index 0000000..1794d39 --- /dev/null +++ b/src/com/droidquest/items/SkyGuard.java @@ -0,0 +1,62 @@ +package com.droidquest.items; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class SkyGuard extends Item +{ +int animationState=0; +int speed; + +public SkyGuard (int X, int Y, Room r, int s) + { + x=X; y=Y; room=r; + speed=s; + width=28; height=32; + grabbable = false; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[5]; + for (int a=0; a<5; a++) + icons[a] = new ImageIcon("images/skyguard"+a+".gif"); + currentIcon = icons[0].getImage(); + } + +public void Animate() + { + animationState = 1-animationState; + + if (speed>0) + { + if (speed+x < 420) + { + MoveRight(speed); + currentIcon = icons[animationState].getImage(); + } + else + { + speed=-speed; + currentIcon = icons[2].getImage(); + } + } + else if (speed<0) + { + if (speed+x > 112) + { + MoveLeft(-speed); + currentIcon = icons[3+animationState].getImage(); + } + else + { + speed=-speed; + currentIcon = icons[2].getImage(); + } + } + + } + +} diff --git a/src/com/droidquest/items/SkywayFlyer.java b/src/com/droidquest/items/SkywayFlyer.java new file mode 100644 index 0000000..c184b78 --- /dev/null +++ b/src/com/droidquest/items/SkywayFlyer.java @@ -0,0 +1,66 @@ +package com.droidquest.items; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.levels.Level; + +public class SkywayFlyer extends Item +{ +int speed; +String[] filenames; +int animationState=0; + +public SkywayFlyer(int X, int Y, Room r, String[] f, int spd) + { + x=X; y=Y; room=r; + width=24; height=32; + orgX = 2; + filenames = f; speed=spd; + grabbable = false; + } + +public void GenerateIcons() + { + icons = new ImageIcon[filenames.length]; + for (int a=0; a320) + y = 32; + } + +public void Animate() + { + animationState++; + if (animationState == filenames.length) + animationState=0; + currentIcon = icons[animationState].getImage(); + + if (speed<0) + MoveUp(-speed); + else + MoveDown(speed); + + if (Overlaps(level.player)) + { + level.PlaySound(room, Level.DISCHARGESOUND); + level.player.x = 2*28; + level.player.y = 8*32; + level.player.SetRoom(room.downRoom); + } + } + +} diff --git a/src/com/droidquest/items/SlipperyToken.java b/src/com/droidquest/items/SlipperyToken.java new file mode 100644 index 0000000..a49c7db --- /dev/null +++ b/src/com/droidquest/items/SlipperyToken.java @@ -0,0 +1,59 @@ +package com.droidquest.items; + +import com.droidquest.Room; +import com.droidquest.materials.Material; + +public class SlipperyToken extends Token +{ +boolean jumping = true; + +public SlipperyToken(int X, int Y, Room r) + { + super(X,Y,r); + } + +public boolean CanBePickedUp(Item item) + { + if (item == level.player && jumping) + return false; + else + return true; + } + +public void IsDropped() + { + int bigX = (x+width/2)/28; + int bigY = (y+height/2)/32; + Material mat = room.MaterialArray[bigY][bigX]; + if (mat.getClass().toString().endsWith("VendingSlot")) + { + for (int a=0; a0); + boolean bit = (program[doorState][radioState]==1); + if (radio == bit) + { + radioState++; + if (radioState == program[doorState].length) + doorState++; + } + else + radioState =1; + } + break; + + case RESET: + currentRoom = room; + break; + + case LEFT: + currentRoom = currentRoom.leftRoom; + break; + + case RIGHT: + currentRoom = currentRoom.rightRoom; + break; + + case UP: + currentRoom = currentRoom.upRoom; + break; + + case DOWN: + currentRoom = currentRoom.downRoom; + break; + } + + } + + } diff --git a/src/com/droidquest/items/SpeedControl.java b/src/com/droidquest/items/SpeedControl.java new file mode 100644 index 0000000..a7704e1 --- /dev/null +++ b/src/com/droidquest/items/SpeedControl.java @@ -0,0 +1,96 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.chipstuff.ChipCompiler; +import com.droidquest.decorations.TextBox; +import com.droidquest.materials.Material; + +public + +class SpeedControl extends Item +{ +int direction; +public static final int DIR_UP = 0; +public static final int DIR_DOWN = 1; + +public SpeedControl(int X, int Y, Room r, int dir) + { + x=X; y=Y; + room = r; + width=26; height=26; + direction = dir; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + switch(direction) + { + case DIR_UP: + g.fillRect(12,0,2,2); + g.fillRect(10,2,6,2); + g.fillRect(8,4,10,2); + g.fillRect(6,6,14,2); + g.fillRect(4,8,18,2); + g.fillRect(2,10,22,2); + g.fillRect(0,12,26,2); + g.fillRect(10,14,6,12); + break; + case DIR_DOWN: + g.fillRect(12,24,2,2); + g.fillRect(10,22,6,2); + g.fillRect(8,20,10,2); + g.fillRect(6,18,14,2); + g.fillRect(4,16,18,2); + g.fillRect(2,14,22,2); + g.fillRect(0,12,26,2); + g.fillRect(10,0,6,12); + break; + } + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item item) + { + switch (direction) + { + case DIR_UP: + ChipCompiler.chipSpeed++; + break; + case DIR_DOWN: + if (ChipCompiler.chipSpeed==1) return false; + ChipCompiler.chipSpeed--; + break; + } + TextBox tb = (TextBox) room.textBoxes.elementAt(1); + tb.textString = ChipCompiler.chipSpeed + "x"; + return false; + } + +} + diff --git a/src/com/droidquest/items/SpyCam.java b/src/com/droidquest/items/SpyCam.java new file mode 100644 index 0000000..1da77b5 --- /dev/null +++ b/src/com/droidquest/items/SpyCam.java @@ -0,0 +1,61 @@ +package com.droidquest.items; + +import java.awt.Graphics; +import java.awt.event.KeyEvent; + +import javax.swing.JPanel; + +import com.droidquest.Room; +import com.droidquest.decorations.TextBox; + +public class SpyCam extends Item +{ +public SpyCam(Room r) + { + x=0; y=0; + room = r; + width=0; height=0; + grabbable=false; + } + +public void Draw(Graphics g, JPanel jp) + {} + +public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_RIGHT) + { + SetRoom(room.rightRoom); + return true; + } + if (e.getKeyCode() == e.VK_LEFT) + { + SetRoom(room.leftRoom); + return true; + } + if (e.getKeyCode() == e.VK_UP) + { + SetRoom(room.upRoom); + return true; + } + if (e.getKeyCode() == e.VK_DOWN) + { + SetRoom(room.downRoom); + return true; + } + if (e.getKeyCode() == e.VK_SPACE) + { + level.player=level.gameCursor; + level.currentViewer=level.player; + for (int a=5; a<60; a++) + { + Room r = (Room) level.rooms.elementAt(a); + TextBox tb = (TextBox) r.textBoxes.elementAt(0); + tb.y += 500; + } + return false; + } + return false; + } + +} \ No newline at end of file diff --git a/src/com/droidquest/items/Square.java b/src/com/droidquest/items/Square.java new file mode 100644 index 0000000..3d42ffc --- /dev/null +++ b/src/com/droidquest/items/Square.java @@ -0,0 +1,45 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Square extends Item +{ +Color color; + +public Square(int X, int Y, Room r, Color c) + { + x=X; y=Y; room=r; + width=28; height=28; + editable=true; + color = c; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + g.setColor(color); + g.fillRect(0,0,28,28); + currentIcon = icons[0].getImage(); + } + +} diff --git a/src/com/droidquest/items/StormCloud.java b/src/com/droidquest/items/StormCloud.java new file mode 100644 index 0000000..147e7a8 --- /dev/null +++ b/src/com/droidquest/items/StormCloud.java @@ -0,0 +1,256 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.devices.StormShield; + +public class StormCloud extends Item +{ +transient int animateState=0; +transient int xDirection; +transient int yDirection; +transient int moveTimer; +transient OrangeRobot orobot; +transient WhiteRobot wrobot; +transient BlueRobot brobot; +transient StormShield stormshield; +static int maxspeed = 30; +transient int anicount=0; + +public StormCloud(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=32; + grabbable=false; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[3]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + for (int a=0; a<3; a++) + { + try + { + g = icons[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,4*28,3*32); + + g.setColor(Color.white); + g.fillRect(16,0,4,2); + g.fillRect(4,2,4,2); + g.fillRect(12,4,4,2); + g.fillRect(20,4,4,2); + g.fillRect(4,8,4,2); + g.fillRect(12,8,4,2); + g.fillRect(24,8,4,2); + g.fillRect(0,10,4,2); + g.fillRect(8,10,4,2); + g.fillRect(16,10,4,2); + g.fillRect(24,12,4,2); + g.fillRect(8,14,4,2); + g.fillRect(16,14,4,2); + g.fillRect(0,18,4,2); + g.fillRect(12,18,4,2); + g.fillRect(24,18,4,2); + g.fillRect(16,20,4,2); + g.fillRect(4,22,4,2); + g.fillRect(20,22,4,2); + g.fillRect(8,24,4,2); + g.fillRect(16,24,4,2); + } + currentIcon = icons[0].getImage(); + do + xDirection = level.random.nextInt(maxspeed*2 + 1)-maxspeed; + while (xDirection == 0); + do + yDirection = level.random.nextInt(maxspeed*2 + 1)-maxspeed; + while (yDirection == 0); + moveTimer = level.random.nextInt(50)+1; + } + +public void Animate() + { + animateState++; + if (animateState==3) animateState=0; + currentIcon = icons[animateState].getImage(); + + if (anicount<3) + { + Graphics g; + anicount++; + try + { + icons[animateState]= new ImageIcon(new BufferedImage(4*28,3*32,BufferedImage.TYPE_4BYTE_ABGR)); + g = icons[animateState].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,4*28,3*32); + for (int b=0; b<50; b++) + { + switch (level.random.nextInt(7)) + { + case 0: g2.setColor(Color.white); break; + case 1: g2.setColor(Color.red); break; + case 2: g2.setColor(Color.orange); break; + case 3: g2.setColor(Color.yellow); break; + case 4: g2.setColor(Color.green); break; + case 5: g2.setColor(Color.blue); break; + case 6: g2.setColor(Color.magenta); break; + } + int x1, y1, d; + int d2 = (3*32/2) * (3*32/2); + do + { + x1 = level.random.nextInt(3*32) + 4*28/2 - 3*32/2; + y1 = level.random.nextInt(3*32); + int xd= (x1 - 4*28/2) ; + int yd= (y1 - 3*32/2); + d = xd*xd + yd*yd; + } + while (d>d2); + g2.fillRect(x1,y1,2,2); + } + } + + moveTimer--; + if (moveTimer==0) + { + do + xDirection = level.random.nextInt(maxspeed*2 + 1)-maxspeed; + while (xDirection == 0); + do + yDirection = level.random.nextInt(maxspeed*2 + 1)-maxspeed; + while (yDirection == 0); + moveTimer = level.random.nextInt(50)+1; + } + if (brobot==null) + { + for (int a=0; a0) MoveRight(xDirection); + if (xDirection<0) MoveLeft(-xDirection); + if (yDirection>0) MoveDown(yDirection); + if (yDirection<0) MoveUp(-yDirection); + + if (brobot!=null) + if (Overlaps(brobot)) + { + boolean drain = true; + if (stormshield.room == brobot.InternalRoom) + if (stormshield.ports[0].value==true) + drain=false; + if (drain) + brobot.charge -= 5000; + if (brobot.charge<0) + brobot.charge = 0; + } + + if (orobot!=null) + if (Overlaps(orobot)) + { + boolean drain = true; + if (stormshield.room == orobot.InternalRoom) + if (stormshield.ports[0].value==true) + drain=false; + if (drain) + orobot.charge -= 5000; + if (orobot.charge<0) + orobot.charge = 0; + } + + if (wrobot!=null) + if (Overlaps(wrobot)) + { + boolean drain = true; + if (stormshield.room == wrobot.InternalRoom) + if (stormshield.ports[0].value==true) + drain=false; + if (drain) + wrobot.charge -= 5000; + if (wrobot.charge<0) + wrobot.charge = 0; + } + + } + +public void MoveRight(int dist) + { + int newX = x + dist; + if (newX > 559 - 4*28/2) + { + xDirection = -(level.random.nextInt(maxspeed)+1); + newX = x + xDirection; + } + x=newX; + } + +public void MoveLeft(int dist) + { + int newX = x - dist; + if (newX < 0) + { + xDirection = level.random.nextInt(maxspeed)+1; + newX = x + xDirection; + } + x=newX; + } + +public void MoveUp(int dist) + { + y -= dist; + if (y < 0) + { + room = room.upRoom; + y += 384; + } + } + +public void MoveDown(int dist) + { + y += dist; + if (y > 383) + { + room = room.downRoom; + y -= 384; + } + } + +} diff --git a/src/com/droidquest/items/Suitcase.java b/src/com/droidquest/items/Suitcase.java new file mode 100644 index 0000000..0be64be --- /dev/null +++ b/src/com/droidquest/items/Suitcase.java @@ -0,0 +1,80 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.materials.Material; + +public class Suitcase extends Item +{ +public Suitcase(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width = 24; height=18; + width = 36; height=42; + orgX = -6; orgY = -12; + + InternalRoom = new Room(); + int[][] table1 = { + {0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + InternalRoom.RoomArray = table1; + + InternalRoom.portalItem = this; + level.rooms.addElement(InternalRoom); + Material mat1 = Material.FindSimiliar(new Material(Color.blue, false, true)); + int mat1Index = level.materials.indexOf(mat1); + + for (int rY=0; rY<12; rY++) + for (int rX=0; rX<20; rX++) + { + if (InternalRoom.RoomArray[rY][rX]==1) + InternalRoom.RoomArray[rY][rX] = mat1Index; + } + + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.blue); + g.fillRect(0,4,24,14); + g.fillRect(7,0,10,2); + g.fillRect(7,0,2,4); + g.fillRect(15,0,2,4); + currentIcon = icons[0].getImage(); + } + +} \ No newline at end of file diff --git a/src/com/droidquest/items/Sweeper.java b/src/com/droidquest/items/Sweeper.java new file mode 100644 index 0000000..d5eda7f --- /dev/null +++ b/src/com/droidquest/items/Sweeper.java @@ -0,0 +1,218 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Sweeper extends Item +{ +int animationState; +// 1=Moving Left +// 2=Stopped and facing camera +// 3=Moving Right +// 4=Stopped and facing camera + +public Sweeper(int X, int Y, Room r) + { + x=X; y=Y; + room=r; + width=48; height=32; + grabbable = false; + GenerateIcons(); + currentIcon = icons[0].getImage(); + animationState=1; + } + +public void GenerateIcons() + { + icons = new ImageIcon[3]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + + // sweeper1.gif = Moving Right + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(12,0,12,2); + g.fillRect(8,2,20,10); + g.fillRect(8,12,24,2); + g.fillRect(4,14,28,8); + g.fillRect(4,22,36,6); + g.fillRect(0,28,40,4); + g.fillRect(28,4,8,2); + g.fillRect(36,2,4,6); + g.fillRect(32,14,12,2); + g.fillRect(40,12,8,2); + g.fillRect(40,16,8,2); + g.setColor(Color.black); + g.fillRect(12,8,4,4); + g.fillRect(20,8,4,4); + g.fillRect(8,16,4,2); + g.fillRect(8,20,4,2); + g.fillRect(8,26,4,2); + g.fillRect(16,18,4,2); + g.fillRect(16,22,4,2); + g.fillRect(20,26,4,2); + g.fillRect(24,16,4,2); + g.fillRect(24,20,4,2); + g.fillRect(28,24,4,2); + g.fillRect(32,28,4,2); + + // sweeper2.gif = Looking Straight + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(18,0,12,2); + g.fillRect(14,2,20,10); + g.fillRect(10,12,28,20); + g.fillRect(6,28,36,4); + g.setColor(Color.black); + g.fillRect(22,2,4,6); + g.fillRect(18,4,12,2); + g.fillRect(18,8,4,4); + g.fillRect(26,8,4,4); + g.fillRect(14,12,4,6); + g.fillRect(30,12,4,6); + g.fillRect(14,20,4,2); + g.fillRect(14,24,4,2); + g.fillRect(14,28,4,2); + g.fillRect(22,16,4,2); + g.fillRect(22,20,4,2); + g.fillRect(22,24,4,2); + g.fillRect(22,28,4,2); + g.fillRect(30,20,4,2); + g.fillRect(30,24,4,2); + g.fillRect(30,28,4,2); + + // sweeper3.gif = Moving Left + try + { + g = icons[2].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g2 = (Graphics2D) g; + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(24,0,12,2); + g.fillRect(20,2,20,10); + g.fillRect(16,12,24,2); + g.fillRect(16,14,28,8); + g.fillRect(12,22,36,6); + g.fillRect(8,28,40,4); + g.fillRect(12,4,8,2); + g.fillRect(8,2,4,6); + g.fillRect(4,14,12,2); + g.fillRect(0,12,8,2); + g.fillRect(0,16,8,2); + g.setColor(Color.black); + g.fillRect(24,8,4,4); + g.fillRect(32,8,4,4); + g.fillRect(36,16,4,2); + g.fillRect(36,20,4,2); + g.fillRect(36,26,4,2); + g.fillRect(28,18,4,2); + g.fillRect(28,22,4,2); + g.fillRect(24,26,4,2); + g.fillRect(20,16,4,2); + g.fillRect(20,20,4,2); + g.fillRect(16,24,4,2); + g.fillRect(12,28,4,2); + + switch (animationState) + { + case 1: + currentIcon = icons[0].getImage(); + break; + case 3: + currentIcon = icons[2].getImage(); + break; + case 2: + case 4: + currentIcon = icons[1].getImage(); + break; + } + } + +public void Animate() + { + for (int a = 0; a< level.items.size(); a++) + { + Item testItem = (Item) level.items.elementAt(a); + if (testItem.carriedBy == null) + if (Overlaps(testItem)) + { + testItem.x = 280; + testItem.y = 192; + testItem.SetRoom((Room) level.rooms.elementAt(1)); + } + } + + switch (animationState) + { + case 1: + if (room==(Room) level.rooms.elementAt(14) && x>=120) + { + animationState = 2; + currentIcon = icons[1].getImage(); + } + else + MoveRight(8); + break; + + case 2: + animationState = 3; + currentIcon = icons[2].getImage(); + break; + + case 3: + if (room==(Room) level.rooms.elementAt(2) && x<=504) + { + animationState = 4; + currentIcon = icons[2].getImage(); + } + else + MoveLeft(8); + break; + + case 4: + animationState = 1; + currentIcon = icons[0].getImage(); + } + } + +} + diff --git a/src/com/droidquest/items/Switch4A.java b/src/com/droidquest/items/Switch4A.java new file mode 100644 index 0000000..e7e7a4b --- /dev/null +++ b/src/com/droidquest/items/Switch4A.java @@ -0,0 +1,164 @@ +package com.droidquest.items; + +import com.droidquest.Room; +import com.droidquest.materials.Switch; + +public class Switch4A extends Switch +{ +int count = 0; +int doorState=0; +transient Room room= null; + +public Switch4A() + { + super(Switch.ROT_UP); + GenerateIcons(); + } + +public void TouchedByItem(Item item) + { + if (!value) + { + value=true; + count++; + room = item.room; + } + } + +public void Animate() + { + super.Animate(); + + if (doorState==0 && count==4) + doorState=1; + + switch (doorState) + { + case 1: + room.SetMaterial(8,3,0); + room.SetMaterial(9,3,0); + room.SetMaterial(10,3,0); + room.SetMaterial(11,3,0); + room.SetMaterial(8,8,0); + room.SetMaterial(9,8,0); + room.SetMaterial(10,8,0); + room.SetMaterial(11,8,0); + room.SetMaterial(12,4,0); + room.SetMaterial(12,5,0); + room.SetMaterial(12,6,0); + room.SetMaterial(12,7,0); + room.SetMaterial(13,4,4); + room.SetMaterial(13,7,4); + room.SetMaterial(7,4,0); + room.SetMaterial(7,5,0); + room.SetMaterial(7,6,0); + room.SetMaterial(7,7,0); + room.SetMaterial(6,4,4); + room.SetMaterial(6,7,4); + doorState++; + break; + case 2: + room.SetMaterial(8,2,0); + room.SetMaterial(9,2,0); + room.SetMaterial(10,2,0); + room.SetMaterial(11,2,0); + room.SetMaterial(12,2,0); + room.SetMaterial(7,9,0); + room.SetMaterial(8,9,0); + room.SetMaterial(9,9,0); + room.SetMaterial(10,9,0); + room.SetMaterial(11,9,0); + room.SetMaterial(13,4,0); + room.SetMaterial(13,5,0); + room.SetMaterial(13,6,0); + room.SetMaterial(13,7,0); + room.SetMaterial(14,4,4); + room.SetMaterial(14,7,4); + room.SetMaterial(6,4,0); + room.SetMaterial(6,5,0); + room.SetMaterial(6,6,0); + room.SetMaterial(6,7,0); + room.SetMaterial(5,4,4); + room.SetMaterial(5,7,4); + doorState++; + break; + case 3: + room.SetMaterial(8,1,0); + room.SetMaterial(9,1,0); + room.SetMaterial(10,1,0); + room.SetMaterial(11,1,0); + room.SetMaterial(8,10,0); + room.SetMaterial(9,10,0); + room.SetMaterial(10,10,0); + room.SetMaterial(11,10,0); + room.SetMaterial(14,4,0); + room.SetMaterial(14,5,0); + room.SetMaterial(14,6,0); + room.SetMaterial(14,7,0); + room.SetMaterial(15,4,4); + room.SetMaterial(15,7,4); + room.SetMaterial(5,4,0); + room.SetMaterial(5,5,0); + room.SetMaterial(5,6,0); + room.SetMaterial(5,7,0); + room.SetMaterial(4,4,4); + room.SetMaterial(4,7,4); + doorState++; + break; + case 4: + Room temproom = room.rightRoom; // KeyTunnel Left + temproom.SetMaterial(2,3,0); + for (int a=0; a<8; a++) + { + temproom.SetMaterial(8,a+1,0); + temproom.SetMaterial(12,a+1,0); + temproom.SetMaterial(16,a+1,0); + } + temproom = temproom.rightRoom; // KeyTunnel Right + for (int a=0; a<8; a++) + { + temproom.SetMaterial(3,a+1,0); + temproom.SetMaterial(7,a+1,0); + temproom.SetMaterial(11,a+1,0); + } + temproom = room.leftRoom; // MineField top right + for (int Y=0; Y<12; Y++) + for (int X=0; X<20; X++) + if (temproom.RoomArray[Y][X]==8) + temproom.SetMaterial(X,Y,11); + temproom = temproom.leftRoom; // MineField top left + for (int Y=0; Y<12; Y++) + for (int X=0; X<20; X++) + { + if (temproom.RoomArray[Y][X]==8) + temproom.SetMaterial(X,Y,11); + if (temproom.RoomArray[Y][X]==16) + temproom.SetMaterial(X,Y,0); + } + temproom = temproom.downRoom; // MineField botom left + for (int Y=0; Y<12; Y++) + for (int X=0; X<20; X++) + if (temproom.RoomArray[Y][X]==8) + temproom.SetMaterial(X,Y,11); + temproom = temproom.rightRoom; // MineField bottom right + for (int Y=0; Y<12; Y++) + for (int X=0; X<20; X++) + if (temproom.RoomArray[Y][X]==8) + temproom.SetMaterial(X,Y,11); + temproom = room.upRoom; + temproom.SetMaterial(19,5,0); + temproom.SetMaterial(19,6,0); + temproom.SetMaterial(19,7,0); + temproom = temproom.rightRoom; + temproom = temproom.upRoom; + temproom = temproom.leftRoom; + temproom = temproom.leftRoom; + temproom.SetMaterial(19,5,0); + temproom.SetMaterial(19,6,0); + doorState++; + break; + + } + } + +} diff --git a/src/com/droidquest/items/Switch4B.java b/src/com/droidquest/items/Switch4B.java new file mode 100644 index 0000000..9b6f546 --- /dev/null +++ b/src/com/droidquest/items/Switch4B.java @@ -0,0 +1,34 @@ +package com.droidquest.items; + +import com.droidquest.materials.Material; +import com.droidquest.materials.Switch; + +public class Switch4B extends Switch +{ +transient Switch4A sw = null; + +public Switch4B() + { + super(Switch.ROT_RIGHT); + } + +public void TouchedByItem(Item item) + { + if (sw==null) + { + for (int a=0; a320) y=320; + } + else + { + // Open ToolBox + width=166; height=94; + open=true; + currentIcon = icons[1].getImage(); + y-=72; + if (y<32) y=32; + if (x>338) x=338; + } + } + +public boolean CanBePickedUp(Item item) + { + if (item != level.gameCursor) return false; + if (open) + { + int ix = item.x - x + item.width/2; + int iy = item.y - y + item.height/2; + if (ix < 26 && iy > 72) + return true; + + if (ix > 30 && ix < (30+28) && iy > 4 && iy < (4+50) ) + { + ANDGate ag = new ANDGate(x+30,y+4,item.room); + level.items.addElement(ag); + item.PicksUp(ag); + return false; + } + + if (ix > 64 && ix < (64+28) && iy > 4 && iy < (4+50) ) + { + ORGate og = new ORGate(x+64,y+4,item.room); + level.items.addElement(og); + item.PicksUp(og); + return false; + } + + if (ix > 98 && ix < (98+28) && iy > 4 && iy < (4+50) ) + { + XORGate xg = new XORGate(x+98,y+4,item.room); + level.items.addElement(xg); + item.PicksUp(xg); + return false; + } + + if (ix > 132 && ix < (132+28) && iy > 4 && iy < (4+50) ) + { + NOTGate ng = new NOTGate(x+132,y+4,item.room); + level.items.addElement(ng); + ng.ports[1].value=true; + item.PicksUp(ng); + return false; + } + + if (ix > 30 && ix < (30+48) && iy > 58 && iy < (58+32) ) + { + FlipFlop ff = new FlipFlop(x+30,y+58,item.room); + level.items.addElement(ff); + ff.ports[3].value=true; + item.PicksUp(ff); + return false; + } + + if (ix > 74 && ix < (74+22) && iy > 58 && iy < (58+32) ) + { + Node n1 = new Node(x+74,y+58,item.room, Node.TYPE_STRAIGHT); + level.items.addElement(n1); + item.PicksUp(n1); + return false; + } + + if (ix > 98 && ix < (98+28) && iy > 58 && iy < (58+32) ) + { + Node n2 = new Node(x+98,y+58,item.room, Node.TYPE_RIGHT); + level.items.addElement(n2); + item.PicksUp(n2); + return false; + } + + if (ix > 128 && ix < (128+28) && iy > 58 && iy < (58+32) ) + { + Node n3 = new Node(x+128,y+58,item.room, Node.TYPE_THREE); + level.items.addElement(n3); + item.PicksUp(n3); + return false; + } + } + else + return true; + return false; + } + +} diff --git a/src/com/droidquest/items/Train.java b/src/com/droidquest/items/Train.java new file mode 100644 index 0000000..f072c9d --- /dev/null +++ b/src/com/droidquest/items/Train.java @@ -0,0 +1,103 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.materials.Material; + +public class Train extends Item +{ +public Train() + { + x=0; y=0; room =null; + width=56; height=32; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(0,2,40,20); + g.fillRect(4,0,32,2); + g.fillRect(40,4,4,16); + g.fillRect(44,6,4,12); + g.fillRect(48,8,4,8); + g.fillRect(52,10,4,4); + g.fillRect(0,26,16,4); + g.fillRect(4,24,8,8); + g.fillRect(24,26,16,4); + g.fillRect(28,24,8,8); + g.setColor(Color.black); + g.fillRect(8,4,12,8); + g.fillRect(4,14,36,2); + g.fillRect(16,18,16,2); + g.fillRect(28,4,4,8); + g.fillRect(32,6,4,6); + g.fillRect(36,8,4,4); + currentIcon = icons[0].getImage(); + } + +public boolean CanBePickedUp(Item item) + { + if (item == level.player) + { + PicksUp(level.player); + level.player = this; + Material mat = (Material) level.materials.elementAt(8); + mat.passable=true; + } + return false; + } + +public boolean KeyUp(KeyEvent e) + { + if (e.getKeyCode() == e.VK_SPACE) + { + if (level.rooms.indexOf(room)==14) + { + room.SetMaterial(8,0,0); + room.SetMaterial(9,0,0); + room.SetMaterial(10,0,0); + room.SetMaterial(11,0,0); + room.SetMaterial(18,8,0); + room.SetMaterial(18,9,0); + } + level.player=carrying; + Drops(); + room=null; + Material mat = (Material) level.materials.elementAt(8); + mat.passable=false; + } + return false; + } + +public void Animate() + { + if (room != null) + if (carrying != null) + MoveRight(8); + } + + +} diff --git a/src/com/droidquest/items/TrashCollector.java b/src/com/droidquest/items/TrashCollector.java new file mode 100644 index 0000000..6fae7d8 --- /dev/null +++ b/src/com/droidquest/items/TrashCollector.java @@ -0,0 +1,392 @@ +package com.droidquest.items; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class TrashCollector extends Item +{ +int animationState=0; +int behavior=0; +// 0 = Patrol Left to Room 31 +// 1 = Patrol Up to Room 5 +// 2 = Patrol Right to Room 11 +// 3 = Patrol Down to Room 17 +// 4 = Patrol Left to Room 19 +// 5 = Go up to Room 58 +// 6 = Go down to Room 19 +// 7 = Prowl (approach until get item) +int previousBehavior; +int gotoX; +int gotoY; +Room gotoRoom; +Item target=null; + +public TrashCollector(int X, int Y, Room r) + { + x=X; y=Y; + room = r; + width=28; height=32; + grabbable = false; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[2]; + icons[0] = new ImageIcon("images/trashcollector0.gif"); + icons[1] = new ImageIcon("images/trashcollector1.gif"); + currentIcon = icons[0].getImage(); + } + +public void Animate() + { + animationState = 1-animationState; + currentIcon = icons[animationState].getImage(); + + if (gotoRoom==null) // Sets destination room + { + gotoX=266; gotoY=176; + switch(behavior) + { + case 0: + gotoRoom = (Room) level.rooms.elementAt(31); + break; + case 1: + gotoRoom = (Room) level.rooms.elementAt(5); + break; + case 2: + gotoRoom = (Room) level.rooms.elementAt(11); + break; + case 3: + gotoRoom = (Room) level.rooms.elementAt(17); + break; + case 4: + gotoRoom = (Room) level.rooms.elementAt(19); + break; + case 5: + gotoRoom = (Room) level.rooms.elementAt(58); + break; + case 6: + gotoRoom = (Room) level.rooms.elementAt(19); + break; + } + } + + if (behavior<5) // Check for items in hallway + { + for (int a=0; a 4) diff=4; + MoveDown(diff*dir); + } + } + else + { + if (x==gotoX && y==gotoY) + { + gotoRoom=null; + behavior=1; + } + if (x != gotoX) + { + int diff = Math.abs(gotoX - x); + int dir = diff / (gotoX - x); + if (diff > 4) diff = 4; + MoveRight(diff * dir); + } + if (y != gotoY) + { + int diff = Math.abs(gotoY - y); + int dir = diff / (gotoY - y); + if (diff > 4) diff = 4; + MoveDown(diff * dir); + } + } + break; + case 1: // Move Up to Room 5 + if (room != gotoRoom) + { + MoveUp(4); + if (x!=266) + { + int diff = Math.abs(266-y); + int dir = diff / (266-y); + if (diff > 4) diff=4; + MoveRight(diff*dir); + } + } + else + { + if (x==gotoX && y==gotoY) + { + gotoRoom=null; + behavior=2; + } + if (x != gotoX) + { + int diff = Math.abs(gotoX - x); + int dir = diff / (gotoX - x); + if (diff > 4) diff = 4; + MoveRight(diff * dir); + } + if (y != gotoY) + { + int diff = Math.abs(gotoY - y); + int dir = diff / (gotoY - y); + if (diff > 4) diff = 4; + MoveDown(diff * dir); + } + } + break; + case 2: // Move Right to Room 11 + if (room != gotoRoom) + { + MoveRight(4); + if (y!=176) + { + int diff = Math.abs(176-y); + int dir = diff / (176-y); + if (diff > 4) diff=4; + MoveDown(diff*dir); + } + } + else + { + if (x==gotoX && y==gotoY) + { + gotoRoom = null; + behavior=3; + } + if (x != gotoX) + { + int diff = Math.abs(gotoX - x); + int dir = diff / (gotoX - x); + if (diff > 4) diff = 4; + MoveRight(diff * dir); + } + if (y != gotoY) + { + int diff = Math.abs(gotoY - y); + int dir = diff / (gotoY - y); + if (diff > 4) diff = 4; + MoveDown(diff * dir); + } + } + break; + case 3: // Move Down to Room 17 + if (room != gotoRoom) + { + MoveDown(4); + if (x!=266) + { + int diff = Math.abs(266-y); + int dir = diff / (266-y); + if (diff > 4) diff=4; + MoveRight(diff*dir); + } + } + else + { + if (x==gotoX && y==gotoY) + { + gotoRoom = null; + behavior=4; + } + if (x != gotoX) + { + int diff = Math.abs(gotoX - x); + int dir = diff / (gotoX - x); + if (diff > 4) diff = 4; + MoveRight(diff * dir); + } + if (y != gotoY) + { + int diff = Math.abs(gotoY - y); + int dir = diff / (gotoY - y); + if (diff > 4) diff = 4; + MoveDown(diff * dir); + } + } + break; + case 4: // Move Left to Room 19 + if (room != gotoRoom) + { + MoveLeft(4); + if (y!=176) + { + int diff = Math.abs(176-y); + int dir = diff / (176-y); + if (diff > 4) diff=4; + MoveDown(diff*dir); + } + } + else + { + if (x==gotoX && y==gotoY) + { + int holdings=0; + Room purge = (Room) level.rooms.elementAt(60); + for (int a=0; a 4) diff = 4; + MoveRight(diff * dir); + } + if (y != gotoY) + { + int diff = Math.abs(gotoY - y); + int dir = diff / (gotoY - y); + if (diff > 4) diff = 4; + MoveDown(diff * dir); + } + } + break; + case 5: // Move Up to Room 58 + if (room != gotoRoom) + { + MoveUp(4); + if (x!=266) + { + int diff = Math.abs(266-y); + int dir = diff / (266-y); + if (diff > 4) diff=4; + MoveRight(diff*dir); + } + } + else + { + if (x==gotoX && y==gotoY) + { + Room purge = (Room) level.rooms.elementAt(60); + for (int a=0; a 4) diff = 4; + MoveRight(diff * dir); + } + if (y != gotoY) + { + int diff = Math.abs(gotoY - y); + int dir = diff / (gotoY - y); + if (diff > 4) diff = 4; + MoveDown(diff * dir); + } + } + break; + case 6: // Move Down to Room 19 + if (room != gotoRoom) + { + MoveDown(4); + if (x!=266) + { + int diff = Math.abs(266-y); + int dir = diff / (266-y); + if (diff > 4) diff=4; + MoveRight(diff*dir); + } + } + else + { + if (x==gotoX && y==gotoY) + { + gotoRoom = null; + behavior=0; + } + if (x != gotoX) + { + int diff = Math.abs(gotoX - x); + int dir = diff / (gotoX - x); + if (diff > 4) diff = 4; + MoveRight(diff * dir); + } + if (y != gotoY) + { + int diff = Math.abs(gotoY - y); + int dir = diff / (gotoY - y); + if (diff > 4) diff = 4; + MoveDown(diff * dir); + } + } + break; + case 7: // Approach item + if (target.room == room && target.carriedBy == null) + { + if (Overlaps(target)) + { + target.room = (Room) level.rooms.elementAt(60); + behavior = previousBehavior; + } + else + { + if (x != target.x) + { + int diff = Math.abs(target.x - x); + int dir = diff / (target.x - x); + if (diff > 8) diff = 8; + MoveRight(diff * dir); + } + if (y != target.y) + { + int diff = Math.abs(target.y - y); + int dir = diff / (target.y - y); + if (diff > 8) diff = 8; + MoveDown(diff * dir); + } + } + } + else + { + behavior = previousBehavior; + } + break; + } + } + +} + diff --git a/src/com/droidquest/items/Triangle.java b/src/com/droidquest/items/Triangle.java new file mode 100644 index 0000000..5cd62f6 --- /dev/null +++ b/src/com/droidquest/items/Triangle.java @@ -0,0 +1,51 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class Triangle extends Item +{ +Color color; + +public Triangle(int X, int Y, Room r, Color c) + { + x=X; y=Y; room=r; + width=28; height=28; + color = c; + editable=true; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(color); + int[] xp = {27, 0,27}; + int[] yp = { 0,14,27}; + g.fillPolygon(xp,yp,3); + currentIcon = icons[0].getImage(); + } + +} + diff --git a/src/com/droidquest/items/Turbine.java b/src/com/droidquest/items/Turbine.java new file mode 100644 index 0000000..2c273fd --- /dev/null +++ b/src/com/droidquest/items/Turbine.java @@ -0,0 +1,121 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.decorations.Spark; + +public class Turbine extends Item +{ + // Turbines are wind-powered locks. They watch the level.sparks vector + // for sparks that intersect them. When Sparks intersect the turbines + // they animate and change materials in the cells array. When the sparks + // stop, the animaiton stops and the cells are slowly replaced. The + // direction of the Sparks don't matter in this case. + // + // The cells array is a straght array with each cell defined with 4 numbers; + // X,Y, Open Material, Closed Material. + // + + int[] cells; + int animationState; + int cellCounter=0; + + public Turbine(int X, int Y, Room r, int[] c) + { + x=X; y=Y; room=r; + cells = c; + width=28; height=64; + grabbable = false; + GenerateIcons(); + } + + public void GenerateIcons() + { + icons = new ImageIcon[4]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[2]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[3]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + for (int a=0; a<4; a++) + { + try + { + g = icons[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.yellow); + g.fillRect(0,28,28,8); + switch(a) + { + case 0: + g.fillOval(4,4,20,24); + g.fillOval(4,36,20,24); + break; + case 1: + g.fillOval(4,12,20,16); + g.fillOval(4,36,20,16); + break; + case 2: + g.fillOval(4,20,20,8); + g.fillOval(4,36,20,8); + break; + case 3: + g.fillOval(4,12,20,16); + g.fillOval(4,36,20,16); + break; + } + } + currentIcon = icons[0].getImage(); + } + + public void Animate() + { + boolean flag = false; + for(int a=0; a= y && spark.y <= y+height) + if (spark.x >= x && spark.x <= x+width) + flag= true; + } + if (flag) + { + animationState = (animationState+1)%4; + currentIcon = icons[animationState].getImage(); + if (cellCounter < cells.length*2) + cellCounter++; + int cell = cellCounter / 8; + if (cell < cells.length/4) + room.SetMaterial(cells[4 * cell], + cells[4 * cell + 1], + cells[4 * cell + 2]); + } + else + { + if (cellCounter>0) + cellCounter--; + int cell = cellCounter / 8; + if (cell < cells.length/4) + room.SetMaterial(cells[4 * cell], + cells[4 * cell + 1], + cells[4 * cell + 3]); + } + } + + } \ No newline at end of file diff --git a/src/com/droidquest/items/UnBurner.java b/src/com/droidquest/items/UnBurner.java new file mode 100644 index 0000000..b9a0f41 --- /dev/null +++ b/src/com/droidquest/items/UnBurner.java @@ -0,0 +1,123 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.devices.PrototypeChip; +import com.droidquest.devices.SmallChip; +import com.droidquest.levels.Level; + +public class UnBurner extends Item +{ +int burning; +int animation; + +public UnBurner(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=30; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[2]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + Graphics2D g2; + Color transparent = new Color(0,0,0,0); + + // 0 = Off + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(Color.white); + g.fillRect(0,0,28,30); + g.setColor(Color.black); + g.fillRect(8,8,12,14); + g.fillRect(4,10,20,10); + g.setColor(Color.white); + g.fillRect(12,10,4,10); + g.fillRect(8,12,12,6); + + // 1 = On + try + { + g = icons[1].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(new Color(255,128,0)); + g.fillRect(0,0,28,30); + g.setColor(Color.black); + g.fillRect(8,8,12,14); + g.fillRect(4,10,20,10); + g.setColor(new Color(255,128,0)); + g.fillRect(12,10,4,10); + g.fillRect(8,12,12,6); + + currentIcon = icons[0].getImage(); + + } + +public boolean CanBePickedUp(Item i) + { + // Find the SmallChip and Erase it + Item sc=null; + for (int a=0; a0) + { + animation = 1- animation; + currentIcon = icons[animation].getImage(); + burning--; + } + else + currentIcon = icons[0].getImage(); + } + +} diff --git a/src/com/droidquest/items/VendingHandle.java b/src/com/droidquest/items/VendingHandle.java new file mode 100644 index 0000000..8b6da01 --- /dev/null +++ b/src/com/droidquest/items/VendingHandle.java @@ -0,0 +1,191 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class VendingHandle extends Item +{ + // Handle used to pull sliding wall on Vending Machine + + int startX; + int startY; + boolean paid = false; + + public VendingHandle(int X, int Y, Room r) + { + x=X; y=Y; room=r; + startX = X; + startY = Y; + width=28; height=12; + GenerateIcons(); + } + + public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(0,4,16,4); + g.fillRect(16,2,12,8); + g.fillRect(20,0,4,12); + currentIcon = icons[0].getImage(); + } + + public boolean CanBePickedUp(Item item) + { + if (item == level.player) return false; + return true; + } + + public void IsDropped() + { + x = startX; + y = startY; + room.SetMaterial(1,4,14); + room.SetMaterial(2,4,14); + room.SetMaterial(3,4,14); + room.SetMaterial(4,4,14); + room.SetMaterial(5,4,14); + room.SetMaterial(6,4,14); + room.SetMaterial(7,4,14); + room.SetMaterial(8,4,14); + room.SetMaterial(9,4,14); + room.SetMaterial(10,4,7); + room.SetMaterial(11,4,0); + room.SetMaterial(12,4,0); + room.SetMaterial(13,4,0); + room.SetMaterial(14,4,0); + paid = false; + } + + public void Animate() + { + if (carriedBy != null) + { + int maxPull; + if (paid) + maxPull = 4*28; + else + maxPull = 0; + Dimension d = GetXY(); + int tempX = d.width; + int tempY = d.height; + if (tempY != startY) + carriedBy.MoveDown(startY-tempY); + if (tempX < startX) + carriedBy.MoveRight(startX-tempX); + if (tempX > (startX + maxPull)) + carriedBy.MoveLeft(tempX - (startX+maxPull)); + + d = GetXY(); + tempX = d.width; + int blocks = (tempX-startX)/28; + switch (blocks) + { + case 0: + room.SetMaterial(1,4,14); + room.SetMaterial(2,4,14); + room.SetMaterial(3,4,14); + room.SetMaterial(4,4,14); + room.SetMaterial(5,4,14); + room.SetMaterial(6,4,14); + room.SetMaterial(7,4,14); + room.SetMaterial(8,4,14); + room.SetMaterial(9,4,14); + room.SetMaterial(10,4,7); + room.SetMaterial(11,4,0); + room.SetMaterial(12,4,0); + room.SetMaterial(13,4,0); + room.SetMaterial(14,4,0); + break; + case 1: + room.SetMaterial(1,4,0); + room.SetMaterial(2,4,14); + room.SetMaterial(3,4,14); + room.SetMaterial(4,4,14); + room.SetMaterial(5,4,14); + room.SetMaterial(6,4,14); + room.SetMaterial(7,4,14); + room.SetMaterial(8,4,14); + room.SetMaterial(9,4,14); + room.SetMaterial(10,4,14); + room.SetMaterial(11,4,7); + room.SetMaterial(12,4,0); + room.SetMaterial(13,4,0); + room.SetMaterial(14,4,0); + break; + case 2: + room.SetMaterial(1,4,0); + room.SetMaterial(2,4,0); + room.SetMaterial(3,4,14); + room.SetMaterial(4,4,14); + room.SetMaterial(5,4,14); + room.SetMaterial(6,4,14); + room.SetMaterial(7,4,14); + room.SetMaterial(8,4,14); + room.SetMaterial(9,4,14); + room.SetMaterial(10,4,14); + room.SetMaterial(11,4,14); + room.SetMaterial(12,4,7); + room.SetMaterial(13,4,0); + room.SetMaterial(14,4,0); + break; + case 3: + room.SetMaterial(1,4,0); + room.SetMaterial(2,4,0); + room.SetMaterial(3,4,0); + room.SetMaterial(4,4,14); + room.SetMaterial(5,4,14); + room.SetMaterial(6,4,14); + room.SetMaterial(7,4,14); + room.SetMaterial(8,4,14); + room.SetMaterial(9,4,14); + room.SetMaterial(10,4,14); + room.SetMaterial(11,4,14); + room.SetMaterial(12,4,14); + room.SetMaterial(13,4,7); + room.SetMaterial(14,4,0); + break; + case 4: + room.SetMaterial(1,4,0); + room.SetMaterial(2,4,0); + room.SetMaterial(3,4,0); + room.SetMaterial(4,4,0); + room.SetMaterial(5,4,14); + room.SetMaterial(6,4,14); + room.SetMaterial(7,4,14); + room.SetMaterial(8,4,14); + room.SetMaterial(9,4,14); + room.SetMaterial(10,4,14); + room.SetMaterial(11,4,14); + room.SetMaterial(12,4,14); + room.SetMaterial(13,4,14); + room.SetMaterial(14,4,7); + break; + } + + } + } + + } diff --git a/src/com/droidquest/items/WallHandle.java b/src/com/droidquest/items/WallHandle.java new file mode 100644 index 0000000..ad91f03 --- /dev/null +++ b/src/com/droidquest/items/WallHandle.java @@ -0,0 +1,157 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; + +public class WallHandle extends Item +{ + // Handle used to pull sliding walls in Purple Lock + + int startX; + int startY; + + public WallHandle(int X, int Y, Room r) + { + x=X; y=Y; room=r; + startX = X; + startY = Y; + width=28; height=12; + GenerateIcons(); + } + + public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(0,4,16,4); + g.fillRect(16,2,12,8); + g.fillRect(20,0,4,12); + currentIcon = icons[0].getImage(); + } + + public boolean CanBePickedUp(Item item) + { + if (item == level.player) return false; + return true; + } + + public void IsDropped() + { + x = startX; + y = startY; + int bigY = startY/32; + room.SetMaterial(6,bigY,2); + room.SetMaterial(7,bigY,2); + room.SetMaterial(8,bigY,2); + room.SetMaterial(9,bigY,2); + room.SetMaterial(10,bigY,2); + room.SetMaterial(11,bigY,0); + room.SetMaterial(12,bigY,0); + room.SetMaterial(13,bigY,0); + room.SetMaterial(14,bigY,0); + } + + public void Animate() + { + if (carriedBy != null) + { + int maxPull= 4*28; + Dimension d = GetXY(); + int tempX = d.width; + int tempY = d.height; + if (tempY != startY) + carriedBy.MoveDown(startY-tempY); + if (tempX < startX) + carriedBy.MoveRight(startX-tempX); + if (tempX > (startX + maxPull)) + carriedBy.MoveLeft(tempX - (startX+maxPull)); + + d = GetXY(); + tempX = d.width; + int blocks = (tempX-startX)/28; + int bigY = startY/32; + switch (blocks) + { + case 0: + room.SetMaterial(6,bigY,2); + room.SetMaterial(7,bigY,2); + room.SetMaterial(8,bigY,2); + room.SetMaterial(9,bigY,2); + room.SetMaterial(10,bigY,2); + room.SetMaterial(11,bigY,0); + room.SetMaterial(12,bigY,0); + room.SetMaterial(13,bigY,0); + room.SetMaterial(14,bigY,0); + break; + case 1: + room.SetMaterial(6,bigY,0); + room.SetMaterial(7,bigY,2); + room.SetMaterial(8,bigY,2); + room.SetMaterial(9,bigY,2); + room.SetMaterial(10,bigY,2); + room.SetMaterial(11,bigY,2); + room.SetMaterial(12,bigY,0); + room.SetMaterial(13,bigY,0); + room.SetMaterial(14,bigY,0); + break; + case 2: + room.SetMaterial(6,bigY,0); + room.SetMaterial(7,bigY,0); + room.SetMaterial(8,bigY,2); + room.SetMaterial(9,bigY,2); + room.SetMaterial(10,bigY,2); + room.SetMaterial(11,bigY,2); + room.SetMaterial(12,bigY,2); + room.SetMaterial(13,bigY,0); + room.SetMaterial(14,bigY,0); + break; + case 3: + room.SetMaterial(6,bigY,0); + room.SetMaterial(7,bigY,0); + room.SetMaterial(8,bigY,0); + room.SetMaterial(9,bigY,2); + room.SetMaterial(10,bigY,2); + room.SetMaterial(11,bigY,2); + room.SetMaterial(12,bigY,2); + room.SetMaterial(13,bigY,2); + room.SetMaterial(14,bigY,0); + break; + case 4: + room.SetMaterial(6,bigY,0); + room.SetMaterial(7,bigY,0); + room.SetMaterial(8,bigY,0); + room.SetMaterial(9,bigY,0); + room.SetMaterial(10,bigY,2); + room.SetMaterial(11,bigY,2); + room.SetMaterial(12,bigY,2); + room.SetMaterial(13,bigY,2); + room.SetMaterial(14,bigY,2); + break; + } + + } + } + + } \ No newline at end of file diff --git a/src/com/droidquest/items/Wave.java b/src/com/droidquest/items/Wave.java new file mode 100644 index 0000000..3278fb8 --- /dev/null +++ b/src/com/droidquest/items/Wave.java @@ -0,0 +1,28 @@ +package com.droidquest.items; + +import com.droidquest.Room; + +public class Wave extends HiddenCamera +{ +int animationState; +int animationDir = 1; + +public Wave(Room r) + { + super(r); + } + +public void Animate() + { + animationState+=animationDir; + if (animationState==0 || animationState == 56) + animationDir=-animationDir; + if (animationState % 8 == 0) + { + int Y = (animationState/8) + 1; + room.SetMaterialFill(3,1,14,10,8); + room.SetMaterialFill(3,Y,14,Y+2,0); + } + } + +} \ No newline at end of file diff --git a/src/com/droidquest/items/WhiteRobot.java b/src/com/droidquest/items/WhiteRobot.java new file mode 100644 index 0000000..fa83c52 --- /dev/null +++ b/src/com/droidquest/items/WhiteRobot.java @@ -0,0 +1,73 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; + +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.Bumper; +import com.droidquest.devices.Grabber; +import com.droidquest.devices.Thruster; + +public class WhiteRobot extends GenericRobot +{ +int checker; + +public WhiteRobot(int X, int Y, Room r) + { + super(X,Y,r,Color.white); + checker=0; + Animate(); + devices[0] = new Thruster(176,16,InternalRoom,Port.ROT_UP,Color.blue); + devices[1] = new Thruster(476,128,InternalRoom,Port.ROT_RIGHT,Color.blue); + devices[2] = new Thruster(356,336,InternalRoom,Port.ROT_DOWN,Color.blue); + devices[3] = new Thruster(32,236,InternalRoom,Port.ROT_LEFT,Color.blue); + devices[4] = new Bumper(396,16,InternalRoom,Port.ROT_UP,Color.blue); + devices[5] = new Bumper(480,256,InternalRoom,Port.ROT_RIGHT,Color.blue); + devices[6] = new Bumper(128,330,InternalRoom,Port.ROT_DOWN,Color.blue); + devices[7] = new Bumper(28,134,InternalRoom,Port.ROT_LEFT,Color.blue); + devices[8] = new Antenna(64,70,InternalRoom,Color.blue); + devices[9] = new Grabber(126,44,InternalRoom,Color.blue); + for (int a=0; a<10; a++) + level.items.addElement(devices[a]); + + } + +public void Decorate() + { + super.Decorate(); + checker = 1 - checker; + Graphics g; + int cx, cy; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + + g.setColor(Color.black); + for (cy=0; cy<5; cy++) + for (cx=0; cx<3; cx++) + { + if ((cx+cy+checker)%2==1) + g.fillRect(cx*8+31 , cy*4+36 , 8, 4); + } + + // Generate Random positions for Orange & Blue Block + cx = level.random.nextInt(3); + cy = level.random.nextInt(5); + g.setColor(new Color(255,128,0)); + g.fillRect(cx*8+31,cy*4+36,8,4); + cx = level.random.nextInt(3); + cy = level.random.nextInt(5); + g.setColor(Color.blue); + g.fillRect(cx*8+31,cy*4+36,8,4); + + } + +} diff --git a/src/com/droidquest/items/WireTester.java b/src/com/droidquest/items/WireTester.java new file mode 100644 index 0000000..744d8a9 --- /dev/null +++ b/src/com/droidquest/items/WireTester.java @@ -0,0 +1,108 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.chipstuff.Port; +import com.droidquest.devices.PortDevice; + +public class WireTester extends Item +{ +transient PortDevice myPortDevice; + +public WireTester(int X, int Y, Room r, PortDevice pd) + { + x=X; y=Y; room=r; + width=28; height=26; + myPortDevice=pd; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[2]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + icons[1]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + for (int a=0; a<2; a++) + { + Color color; + if (a==0) + color = Color.white; + else + color = new Color(255,128,0); + Graphics g; + try + { + g = icons[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(color); + g.fillRect(8,0,12,26); + g.fillRect(4,2,20,22); + g.fillRect(0,4,28,18); + g.setColor(Color.black); + g.fillRect(8,6,12,14); + g.fillRect(4,8,20,10); + g.setColor(color); + g.fillRect(12,8,4,10); + g.fillRect(8,10,12,6); + } + currentIcon = icons[0].getImage(); + } + +public void writeRef(ObjectOutputStream s) throws IOException + { + super.writeRef(s); + s.writeInt(level.items.indexOf(myPortDevice)); + } + +public void readRef(ObjectInputStream s) throws IOException + { + super.readRef(s); + myPortDevice = (PortDevice) level.FindItem(s.readInt()); + } + +public boolean CanBePickedUp(Item i) + { + if (myPortDevice.ports[0].type==Port.TYPE_OUTPUT) + myPortDevice.ports[0].value = !myPortDevice.ports[0].value; + return false; + } + +public void Decorate() + { + if (myPortDevice!=null) + { + if (myPortDevice.ports[0].value) + currentIcon = icons[1].getImage(); + else + currentIcon = icons[0].getImage(); + } + else + currentIcon = icons[0].getImage(); + } + +public void Erase() + { + super.Erase(); + myPortDevice = null; + } + +} + diff --git a/src/com/droidquest/items/XitTicket.java b/src/com/droidquest/items/XitTicket.java new file mode 100644 index 0000000..dd1a8e4 --- /dev/null +++ b/src/com/droidquest/items/XitTicket.java @@ -0,0 +1,80 @@ +package com.droidquest.items; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.materials.Material; +import com.droidquest.materials.XitSlot; + +public class XitTicket extends Item +{ +public XitTicket(int X, int Y, Room r) + { + x=X; y=Y; room=r; + width=28; height=30; + editable=true; + GenerateIcons(); + } + +public void GenerateIcons() + { + icons = new ImageIcon[1]; + icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = icons[0].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color transparent = new Color(0,0,0,0); + g2.setBackground(transparent); + g2.clearRect(0,0,width,height); + g.setColor(Color.white); + g.fillRect(8,0,4,6); + g.fillRect(0,2,8,2); + g.fillRect(0,8,12,2); + g.fillRect(0,12,12,2); + g.fillRect(4,14,4,2); + g.fillRect(0,16,4,2); + g.fillRect(8,16,4,2); + g.fillRect(0,20,12,2); + g.fillRect(8,24,4,6); + g.fillRect(0,26,8,2); + g.fillRect(16,4,4,2); + g.fillRect(24,4,4,2); + g.fillRect(20,6,4,2); + g.fillRect(16,8,4,2); + g.fillRect(24,8,4,2); + g.fillRect(16,16,12,2); + g.fillRect(24,20,4,6); + g.fillRect(16,22,8,2); + currentIcon = icons[0].getImage(); + } + +public void IsDropped() + { + int bigX = (x+width/2)/28; + int bigY = (y+height/2)/32; + Material mat = room.MaterialArray[bigY][bigX]; + if (mat.getClass().toString().endsWith("XitSlot")) + { + XitSlot xitslot = (XitSlot) mat; + xitslot.room = room; + xitslot.doorState=1; + room.SetMaterial(18,1,18); + room = null; + } + } + +} + diff --git a/src/com/droidquest/levels/Level.java b/src/com/droidquest/levels/Level.java new file mode 100644 index 0000000..3418935 --- /dev/null +++ b/src/com/droidquest/levels/Level.java @@ -0,0 +1,997 @@ +package com.droidquest.levels; + +import java.awt.Image; +import java.awt.image.ImageObserver; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.HashMap; +import java.util.Random; +import java.util.Vector; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.devices.SmallChip; +import com.droidquest.SoundClip; +import com.droidquest.Wire; +import com.droidquest.chipstuff.Port; +import com.droidquest.materials.Portal; +import com.droidquest.devices.Device; +import com.droidquest.items.Initializer; +import com.droidquest.items.Item; +import com.droidquest.items.ToolBox; +import com.droidquest.materials.Material; + +public class Level implements ImageObserver, Serializable { + public Item player; + public Item gameCursor; + public Item solderingPen; + public Item remote; + public Item toolbox; + public Item currentViewer; + public Item helpCam; + public Item paintbrush; + public transient Portal portal; + public boolean electricity; + + public Vector rooms = new Vector(); + public Vector materials = new Vector(); + public Vector items = new Vector(); + public Vector sparks = new Vector(); + + public transient RoomDisplay roomdisplay; + public transient Vector invRooms = new Vector(); + public transient Vector invRoomIndexes = new Vector(); + public transient Vector invMaterials = new Vector(); + public transient Vector invMaterialIndexes = new Vector(); + public transient Vector invItems = new Vector(); + public transient Vector invItemIndexes = new Vector(); + + public transient HashMap sounds = new HashMap(); + + public transient Random random = new Random(); + public transient static String ATTACHSOUND = "attach.WAV"; + public transient static String DETATCHSOUND = "detatch.WAV"; + public transient static String PICKUPSOUND = "pickup2.WAV"; + public transient static String DROPSOUND = "drop2.WAV"; + public transient static String BEEPSOUND = "beep2.WAV"; + public transient static String BUMPSOUND = "bump2.WAV"; + public transient static String CHARGESOUND = "charge.WAV"; + public transient static String DISCHARGESOUND = "discharge.WAV"; + public transient static String BURNSOUND = "burn.WAV"; + public transient static String ENDMUSICSOUND = "liberty.mid"; + public transient static String STARTMUSICSOUND = "sp001.wav"; + public transient static String TELEPORTSOUND = "teleport.WAV"; + public transient static String TRANSPORTSOUND = "transport.WAV"; + String[] soundFiles = { + ATTACHSOUND, DETATCHSOUND, PICKUPSOUND, DROPSOUND, + BEEPSOUND, BUMPSOUND, CHARGESOUND, DISCHARGESOUND, + BURNSOUND, ENDMUSICSOUND, STARTMUSICSOUND, + TELEPORTSOUND, TRANSPORTSOUND + }; + public transient boolean cheatmode = true; + + public Level() + { + Item.level = this; + Room.level = this; + Material.level = this; + InitSounds(); + } + + public Level(RoomDisplay rd) + { + roomdisplay = rd; + Item.level = this; + Room.level = this; + Material.level = this; + random.setSeed(System.currentTimeMillis()); + InitSounds(); + } + + public void LinkRoomsLeftRight(int L, int R) + { + ((Room) rooms.elementAt(L)).rightRoom = (Room) rooms.elementAt(R); + ((Room) rooms.elementAt(R)).leftRoom = (Room) rooms.elementAt(L); + } + + public void LinkRoomsUpDown(int U, int D) + { + ((Room) rooms.elementAt(U)).downRoom = (Room) rooms.elementAt(D); + ((Room) rooms.elementAt(D)).upRoom = (Room) rooms.elementAt(U); + } + + public void LinkRoomsHorizontally(int[] roomlist) + { + for (int a=0; a19 || y<0 || y>11) + { + Material mat = (Material) materials.elementAt(0); + if (x<0) + if (r.leftRoom != null) + mat = (Material) materials.elementAt(r.leftRoom.RoomArray[y][x+20]); + if (x>19) + if (r.rightRoom != null) + mat = (Material) materials.elementAt(r.rightRoom.RoomArray[y][x-20]); + if (y<0) + if (r.upRoom != null) + mat = (Material) materials.elementAt(r.upRoom.RoomArray[y+12][x]); + if (y>11) + if (r.downRoom != null) + mat = (Material) materials.elementAt(r.downRoom.RoomArray[y-12][x]); + return mat; + } + else + return (Material) materials.elementAt(r.RoomArray[y][x]); + } + + public Item FindNearestItem(Item a) + { + Item nearest=null; + int dx=100; + int dy=100; + int cxa=a.x+a.getWidth()/2; + int cya=a.y+a.getHeight()/2; + for (int i=0; i < items.size(); i++) + { + Item b = ((Item) items.elementAt(i)); + if (a.Overlaps(b)) + { + int cxb=b.x+b.getWidth()/2; + int cyb=b.y+b.getHeight()/2; + int dx2=Math.abs(cxb-cxa); + int dy2=Math.abs(cyb-cya); + if ((dx2+dy2)<(dx+dy)) + { + nearest=b; + dx=dx2; + dy=dy2; + } + } + } + return nearest; + } + + public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) + { + // This does nothing, but allows Images to be drawn freely onto + // other images. The only reason I have this function is so I have + // an object that implements ImageObserver, which for some stupid + // reason is a requirement for several Graphics methods. + return false; + } + + public void writeObject(ObjectOutputStream s) throws IOException + { + // Save Basic Room Data + int a; + s.writeInt(rooms.size()); + for (a=0; a=items.size()) return null; + return (Item) items.elementAt(itemIndex); + } + + public Room FindRoom(int roomIndex) + { + if (roomIndex==-1) return null; + if (roomIndex>=rooms.size()) return null; + return (Room) rooms.elementAt(roomIndex); + } + + public void Empty() + { + // This goes through the entire level structure and removes all + // references to everything. + + int a,b; + + Room.level=null; + Item.level=null; + + // Remove all Items + for (a=0;a b) + room.RoomArray[Y][X]-=1; + } + } + b--; + } + } + + for (int a=orgNumItems; a4 && a%5==0) + { + // Add a new room + Room oldRoom = (Room) rooms.elementAt(pageIndex); + oldRoom.RoomArray[11][8]=0; + oldRoom.RoomArray[11][9]=0; + oldRoom.RoomArray[11][10]=0; + oldRoom.RoomArray[11][11]=0; + Room newRoom = new Room(); + rooms.addElement(newRoom); + int[][] tablex = { + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + newRoom.RoomArray = tablex; + int newPageIndex = rooms.indexOf(newRoom); + LinkRoomsUpDown(pageIndex,newPageIndex); + pageIndex=newPageIndex; + } + materials.addElement(new Portal("ROlevels/"+files[a], false, false)); + int matIndex = materials.size()-1; + int y = 1+(a%5)*2; + Room room = (Room) rooms.elementAt(pageIndex); + room.RoomArray[y][2] = matIndex; + room.AddTextBox(files[a], 3*28+14, y*32+32, 400); + } + + } + +} + diff --git a/src/com/droidquest/levels/RO1.java b/src/com/droidquest/levels/RO1.java new file mode 100644 index 0000000..08ae49a --- /dev/null +++ b/src/com/droidquest/levels/RO1.java @@ -0,0 +1,1026 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.decorations.Graphix; +import com.droidquest.devices.ANDGate; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.GenericChip; +import com.droidquest.devices.NOTGate; +import com.droidquest.devices.Node; +import com.droidquest.devices.RoomSensor; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.AmpireBot; +import com.droidquest.items.BlackCrystal; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Crystal; +import com.droidquest.items.Initializer; +import com.droidquest.items.Item; +import com.droidquest.items.Key; +import com.droidquest.items.Magnet; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.Sentry; +import com.droidquest.items.Sentry3; +import com.droidquest.items.Suitcase; +import com.droidquest.items.Sweeper; +import com.droidquest.items.Token; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.BlueWall; +import com.droidquest.materials.Lock; +import com.droidquest.materials.LockS1; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class RO1 extends Level +{ +public RO1(RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0= Blank + materials.addElement(new Material(new Color(190,190,255),false, true)); // 1= Light Blue Wall + int[][] lockProgram1 = { + {Lock.NARROW}, + {4,9,0, 4,6,1}, + {4,8,0, 4,5,1}, + {Lock.NARROW}, + {4,8,1, 4,5,0}, + {4,9,1, 4,6,0}, + }; + materials.addElement(new Lock(Color.blue, Color.blue, lockProgram1)); // 2= Lock 1 + materials.addElement(new Material(new Color(0,0,128),false,true)); // 3= Dark Blue Wall + materials.addElement(new BlueWall()); // 4= Blue Wall + int[][] lockProgram2 = { + {Lock.NARROW}, + { 5,1,0, 5,2,0, 5,3,0, 6,1,4, 6,2,4, 6,3,4}, + { 6,1,0, 6,2,0, 6,3,0, 7,1,4, 7,2,4, 7,3,4}, + { 7,1,0, 7,2,0, 7,3,0, 8,1,4, 8,2,4, 8,3,4}, + { 8,1,0, 8,2,0, 8,3,0, 9,1,4, 9,2,4, 9,3,4}, + { 9,1,0, 9,2,0, 9,3,0, 10,1,4, 10,2,4, 10,3,4}, + {10,1,0, 10,2,0, 10,3,0, 11,1,4, 11,2,4, 11,3,4}, + {11,1,0, 11,2,0, 11,3,0, 12,1,4, 12,2,4, 12,3,4}, + {12,1,0, 12,2,0, 12,3,0, 13,1,4, 13,2,4, 13,3,4}, + {13,1,0, 13,2,0, 13,3,0, 14,1,4, 14,2,4, 14,3,4}, + {14,1,0, 14,2,0, 14,3,0, 15,1,4, 15,2,4, 15,3,4}, + {15,1,0, 15,2,0, 15,3,0, 16,1,4, 16,2,4, 16,3,4}, + {16,1,0, 16,2,0, 16,3,0, 17,1,4, 17,2,4, 17,3,4}, + {17,1,0, 17,2,0, 17,3,0, 18,1,4, 18,2,4, 18,3,4}, + {Lock.NARROW}, + {17,1,4, 17,2,4, 17,3,4, 18,1,0, 18,2,0, 18,3,0}, + {16,1,4, 16,2,4, 16,3,4, 17,1,0, 17,2,0, 17,3,0}, + {15,1,4, 15,2,4, 15,3,4, 16,1,0, 16,2,0, 16,3,0}, + {14,1,4, 14,2,4, 14,3,4, 15,1,0, 15,2,0, 15,3,0}, + {13,1,4, 13,2,4, 13,3,4, 14,1,0, 14,2,0, 14,3,0}, + {12,1,4, 12,2,4, 12,3,4, 13,1,0, 13,2,0, 13,3,0}, + {11,1,4, 11,2,4, 11,3,4, 12,1,0, 12,2,0, 12,3,0}, + {10,1,4, 10,2,4, 10,3,4, 11,1,0, 11,2,0, 11,3,0}, + { 9,1,4, 9,2,4, 9,3,4, 10,1,0, 10,2,0, 10,3,0}, + { 8,1,4, 8,2,4, 8,3,4, 9,1,0, 9,2,0, 9,3,0}, + { 7,1,4, 7,2,4, 7,3,4, 8,1,0, 8,2,0, 8,3,0}, + { 6,1,4, 6,2,4, 6,3,4, 7,1,0, 7,2,0, 7,3,0}, + { 5,1,4, 5,2,4, 5,3,4, 6,1,0, 6,2,0, 6,3,0} + }; + materials.addElement(new Lock(Color.blue, Color.blue, lockProgram2)); // 5= Lock2 + materials.addElement(new Material(new Color(0,255,0),false, true)); // 6= Green Wall + materials.addElement(new Portal("RO2.lvl", true, true)); // 7= Portal to Level 2 + materials.addElement(new LockS1()); //8=Secret Lock + + for (int a=0; a<32; a++) + rooms.addElement(new Room()); + + { // Room 0, Entry point + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(19,8,19,10,0); + room.AddTextBox("Welcome Traveller!",150,64, 400); + room.AddTextBox("You have fallen into the under- ground city of Robotropolis. To escape, travel upward through all five levels of the city." + ,60,100,400); + room.AddTextBox("The three robots in the next room will help you on your journey. To learn how they work, choose Robot Anatomy from the menu." + ,60,200,400); + room.AddTextBox("This way to Robotropolis",360,290,200); + room.AddArrow(559, 11*28+16, Arrow.DIR_RIGHT, 100, Color.white); + } + { // Room 1, Robots Here + Room room = (Room) rooms.elementAt(1); + int[][] table1 = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}, + {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0}, + {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0}, + {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table1; + items.addElement(new BlueRobot(6*28, 5*32, room)); + { + Item robot = (Item) items.lastElement(); + BlueRobot brobot = (BlueRobot) robot; + brobot.thrusterPower=true; + RoomSensor rSensor = new RoomSensor(8*28,4*32+16,brobot.InternalRoom, + new Key(0,0,null,Color.white)); + items.addElement(rSensor); + rSensor.rotate(1); rSensor.rotate(1); + NOTGate ng = new NOTGate(5*28,3*32,brobot.InternalRoom); + items.addElement(ng); + FlipFlop ff = new FlipFlop(9*28,6*32,brobot.InternalRoom); + items.addElement(ff); + Wire dummy; + dummy = new Wire(rSensor.ports[0], ng.ports[0]); + dummy = new Wire(ng.ports[1], brobot.devices[9].ports[0]); + dummy = new Wire(ff.ports[0], brobot.devices[5].ports[0]); + dummy = new Wire(ff.ports[1], brobot.devices[7].ports[0]); + dummy = new Wire(ff.ports[2], brobot.devices[1].ports[0]); + dummy = new Wire(ff.ports[3], brobot.devices[3].ports[0]); + } + + items.addElement(new WhiteRobot(8*28, 3*32, room)); + { + Item robot = (Item) items.lastElement(); + WhiteRobot wrobot = (WhiteRobot) robot; + wrobot.thrusterPower=true; + + RoomSensor rSensor = new RoomSensor(4*28,4*32, wrobot.InternalRoom, + new Crystal(0,0,null,0)); + items.addElement(rSensor); + rSensor.rotate(1); rSensor.rotate(1); + NOTGate ng = new NOTGate(5*28, 7*32, wrobot.InternalRoom); + items.addElement(ng); + ng.rotate(1);ng.rotate(1);ng.rotate(1); + FlipFlop ff = new FlipFlop(8*28,6*32,wrobot.InternalRoom); + items.addElement(ff); + ANDGate ag1 = new ANDGate(9*28,2*32,wrobot.InternalRoom); + items.addElement(ag1); + ANDGate ag2 = new ANDGate(12*28,8*32,wrobot.InternalRoom); + items.addElement(ag2); + ag2.rotate(1);ag2.rotate(1); + Node node = new Node(15*28, 7*32, wrobot.InternalRoom, Node.TYPE_THREE); + items.addElement(node); + node.rotate(1); node.rotate(1); + + Wire dummy; + dummy = new Wire(rSensor.ports[0], wrobot.devices[8].ports[0]); + dummy = new Wire(node.ports[0], wrobot.devices[5].ports[0]); + dummy = new Wire(node.ports[1], ag2.ports[0]); + dummy = new Wire(node.ports[2], ng.ports[0]); + dummy = new Wire(node.ports[3], ag1.ports[1]); + dummy = new Wire(ag1.ports[2], wrobot.devices[0].ports[0]); + dummy = new Wire(ag2.ports[2], wrobot.devices[2].ports[0]); + dummy = new Wire(ng.ports[1], wrobot.devices[3].ports[0]); + dummy = new Wire(ff.ports[0], wrobot.devices[4].ports[0]); + dummy = new Wire(ff.ports[1], wrobot.devices[6].ports[0]); + dummy = new Wire(ff.ports[2], ag1.ports[0]); + dummy = new Wire(ff.ports[3], ag2.ports[1]); + } + + items.addElement(new OrangeRobot(14*28, 9*32, room)); + { + Item robot = (Item) items.lastElement(); + OrangeRobot orobot = (OrangeRobot) robot; + orobot.thrusterPower=true; + + RoomSensor rSensor = new RoomSensor(8*28,4*32+16,orobot.InternalRoom, + new Key(0,0,null, Color.white)); + items.addElement(rSensor); + rSensor.rotate(1); rSensor.rotate(1); + NOTGate ng = new NOTGate(5*28,3*32,orobot.InternalRoom); + items.addElement(ng); + SmallChip sc = new SmallChip(10*28,6*32,orobot.InternalRoom,"2"); + items.addElement(sc); + sc.LoadChip("chips/WallHugger.chip"); + Wire dummy; + dummy = new Wire(rSensor.ports[0], ng.ports[0]); + dummy = new Wire(ng.ports[1], orobot.devices[9].ports[0]); // Antenna + dummy = new Wire(sc.ports[0], orobot.devices[0].ports[0]); // Top Thruster + dummy = new Wire(sc.ports[1], orobot.devices[7].ports[0]); // Left Bumper + dummy = new Wire(sc.ports[2], orobot.devices[3].ports[0]); // Left Thruster + dummy = new Wire(sc.ports[3], orobot.devices[6].ports[0]); // Bottom Bumper + dummy = new Wire(sc.ports[4], orobot.devices[2].ports[0]); // Bottom Thruster + dummy = new Wire(sc.ports[5], orobot.devices[5].ports[0]); // Right Bumper + dummy = new Wire(sc.ports[6], orobot.devices[1].ports[0]); // Right Thruster + dummy = new Wire(sc.ports[7], orobot.devices[4].ports[0]); // Top Bumper + } + items.addElement(new Key(8*28, 8*32, room, Color.blue)); + } + { // Room 2, Sewer Door + Room room = (Room) rooms.elementAt(2); + int[][] table2 = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0}, + {1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0}, + {0,0,0,0,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}, + {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}, + {0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1} + }; + room.RoomArray = table2; + room.AddTextBox("{BIG} The City Sewer",40,80,500); + items.addElement(new Sweeper(476, 224, room)); + } + { // Room 3, Maze 1 "PR" + Room room = (Room) rooms.elementAt(3); + int[][] table3= { + {1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}, + {1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1}, + {1,0,0,1,0,0,1,0,0,1,1,1,1,0,0,0,0,0,0,0}, + {1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0}, + {1,0,0,1,1,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0}, + {1,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,1,1,1}, + {1,1,1,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1}, + {1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1} + }; + room.RoomArray = table3; + String[] i1 = {"0073.jpg","0074.jpg"}; + room.graphix.addElement(new Graphix(i1, 4*28+14,5*32)); + } + { // Room 4, Maze 2 "CG" + Room room = (Room) rooms.elementAt(4); + int[][] table4= { + {1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1}, + {1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}, + {1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {1,0,0,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1}, + {1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,0,0,0,0}, + {1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table4; + String[] i6 = {"0075.jpg","0076.jpg","0077.jpg", "0076.jpg"}; + room.graphix.addElement(new Graphix(i6, 13*28, 4*32, + Graphix.BOUNCE, 0,2, 3*16)); + } + { // Room 5, Maze 3 "PC" + Room room = (Room) rooms.elementAt(5); + int[][] table5= { + {1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,1,1,1,1,0,0,1,0,0,1,1,1,0,0,0,0}, + {0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0}, + {0,0,0,0,1,1,1,1,0,0,1,0,0,1,1,1,1,1,1,1}, + {0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1} + }; + room.RoomArray = table5; + } + { // Room 6, Maze 4 "RC" + Room room = (Room) rooms.elementAt(6); + int[][] table6= { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0}, + {1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0}, + {1,0,0,1,1,1,0,0,0,0,1,0,0,0,0,0,1,1,1,1}, + {1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1}, + {0,0,0,1,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1} + }; + room.RoomArray = table6; + String[] i7 = {"0082.jpg","0083.jpg","0084.jpg", "0085.jpg", "0084.jpg", "0083.jpg", "0082.jpg"}; + room.graphix.addElement(new Graphix(i7, 12*28, 4*32, + Graphix.BOUNCE, 0,2, 3*16)); + } + { // Room 7, Maze 5 "MW" + Room room = (Room) rooms.elementAt(7); + int[][] table7= { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,0,0,1}, + {0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,1}, + {1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table7; + String[] i2 = {"0086.jpg","0087.jpg"}; + room.graphix.addElement(new Graphix(i2, 5*28,2*32)); + } + { // Room 8, Maze 6 "CIG" + Room room = (Room) rooms.elementAt(8); + int[][] table8= { + {1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1}, + {1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1}, + {0,0,0,1,0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0}, + {0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,0,1,0,0}, + {1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,1,1,0,0}, + {1,0,0,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}, + {1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1}, + {1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1} + }; + room.RoomArray = table8; + } + { // Room 9, Maze 7 "NH" + Room room = (Room) rooms.elementAt(9); + int[][] table9= { + {1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1}, + {1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,1}, + {1,0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,1}, + {1,0,0,1,0,1,0,0,1,0,0,1,1,1,1,1,0,0,0,1}, + {1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,1}, + {1,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,0,0,1}, + {1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table9; + } + { // Room 10, Maze 8 "SG" + Room room = (Room) rooms.elementAt(10); + int[][] table10= { + {1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1}, + {0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}, + {0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}, + {0,0,0,1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0}, + {0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,1,1,0,0,0}, + {0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table10; + String[] i8 = {"0078.jpg","0079.jpg","0080.jpg", "0081.jpg"}; + room.graphix.addElement(new Graphix(i8, 13*28, 10*32, + Graphix.BOUNCE, 2,0, 5*14)); + } + { // Room 11, Maze Bottom + Room room = (Room) rooms.elementAt(11); + int[][] table11= { + {3,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table11; + items.addElement(new ContactSensor(9*28,2*32,room, new Token(0,0,null))); + } + { // Room 12, Top Corridor 1 + Room room = (Room) rooms.elementAt(12); + int[][] table12 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table12; + } + { // Room 13, Top Corridor 2 + Room room = (Room) rooms.elementAt(13); + int[][] table13 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table13; + } + { // Room 14, Top Corridor Branch + Room room = (Room) rooms.elementAt(14); + int[][] table14 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3} + }; + room.RoomArray = table14; + } + { // Room 15, Hallway Top Right + Room room = (Room) rooms.elementAt(15); + int[][] table15 = { + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3} + }; + room.RoomArray = table15; + } + { // Room 16, Hallway Bottom Right + Room room = (Room) rooms.elementAt(16); + int[][] table16 = { + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table16; + } + { // Room 17, Hallway Bottom + Room room = (Room) rooms.elementAt(17); + int[][] table17 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,0,0,0,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,0,0,0,0,0,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3} + }; + room.RoomArray = table17; + items.addElement(new AmpireBot(10*28,3*32, room)); + } + { // Room 18, Hallway Bottom Left + Room room = (Room) rooms.elementAt(18); + int[][] table18 = { + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table18; + } + { // Room 19, Hallway Top Left + Room room = (Room) rooms.elementAt(19); + int[][] table19 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,0,0,3,3,3,3,3,3} + }; + room.RoomArray = table19; + } + { // Room 20, Hallway Top + Room room = (Room) rooms.elementAt(20); + int[][] table20 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table20; + } + { // Room 21, WallHugger Puzzle + Room room = (Room) rooms.elementAt(21); + int[][] table21 = { + {3,3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3}, + {3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table21; + items.addElement(new Magnet(10*28,9*32, room)); + int[] pace = {3*28, 120, 16*28, 120}; + int[] protect = {0,3*32,19*28,11*32, 10*28,0}; + items.addElement(new Sentry(3*28,120, room, pace, protect, false)); + } + { // Room 22, Bouncer Puzzle + Room room = (Room) rooms.elementAt(22); + int[][] table22 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table22; + items.addElement(new Crystal(16*28,5*32, room,100000)); + int[] pace = {3*28,94, 3*28,302}; + int[] protect = {4*28,0,19*28,11*32, 0,5*32}; + items.addElement(new Sentry(3*28,94, room, pace, protect, false)); + } + { // Room 23, AnteChamber + Room room = (Room) rooms.elementAt(23); + int[][] table23 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,3,3,3}, + {0,0,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,3,3}, + {0,0,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,0,0}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,0,0}, + {3,3,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,0,0}, + {3,3,3,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,3,3}, + {3,3,3,3,3,0,0,0,3,3,3,3,3,0,0,0,0,0,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,3,3} + }; + room.RoomArray = table23; + room.AddTextBox("Do you have EVERYTHING?", + 98,278,168); + } + { // Room 24, Directional Token Sensor here + Room room = (Room) rooms.elementAt(24); + int[][] table24 = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,3,3}, + {3,3,3,0,0,0,0,3,3,3,3,3,3,3,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table24; + room.AddTextBox("Time to board a 'Bot!", + 170,320,500); + items.addElement(new DirectionalSensor(3*28+14,4*32,room,new Token(0,0,null))); + } + { // Room 25, Sewer Grate Top + Room room = (Room) rooms.elementAt(25); + int[][] table25 = { + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,4,0,0,0,0,0,4,0,0,4,0,0,4,0,0,4}, + {4,0,0,0,4,0,0,0,0,0,4,0,0,4,0,0,4,0,0,4}, + {4,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4,0,0,0}, + {4,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4,0,0,0}, + {0,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4,0,0,0}, + {0,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4}, + {0,0,0,0,4,0,0,4,0,0,0,0,0,4,0,0,4,0,0,4}, + {0,0,0,0,4,0,0,4,0,0,0,0,0,4,0,0,4,0,0,4}, + {4,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,0,0,0,4}, + {4,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,0,0,0,4}, + {4,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4} + }; + room.RoomArray = table25; + room.AddTextBox("SEWER GRATE", + 182,48,90); + items.addElement(new Sentry3(2*28,64, room)); + } + { // Room 26, Sewer Grate Bottom + Room room = (Room) rooms.elementAt(26); + int[][] table26 = { + {4,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4}, + {4,0,0,0,0,0,0,4,0,0,4,0,0,4,0,0,4,0,0,4}, + {4,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,4,4,4,4}, + {4,4,4,4,4,0,0,4,0,0,4,0,0,0,0,0,4,0,0,4}, + {4,0,0,0,4,0,0,4,0,0,4,4,4,4,4,4,4,0,0,4}, + {4,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,4,4,4,0,0,4,4,0,0,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table26; + String[] i3 = {"0064.jpg","0065.jpg"}; + room.graphix.addElement(new Graphix(i3, 5*28,10*32)); + String[] i4 = {"0066.jpg","0067.jpg"}; + room.graphix.addElement(new Graphix(i4, 11*28,8*32)); + String[] i5 = {"0068.jpg","0069.jpg"}; + room.graphix.addElement(new Graphix(i5, 16*28,9*32)); + room.AddTextBox("These poor creatures never made it out...Will you???", + 84,224,500); + } + { // Room 27, 2nd Lock + Room room = (Room) rooms.elementAt(27); + int[][] table27 = { + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0}, + {4,4,4,4,4,4,0,0,0,0,0,0,0,5,4,0,0,0,0,0}, + {4,0,0,0,0,4,4,4,4,4,4,0,0,4,4,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table27; + room.AddTextBox("Congratulations!", + 2*28,304,500); + room.AddTextBox("That was a great job!", + 2*28,320,500); + } + { // Room 28, Portal Chamber + Room room = (Room) rooms.elementAt(28); + int[][] table28 = { + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table28; + room.AddTextBox("Prepare for an experience that will transport you to another dimension", + 336,48,224); + room.AddTextBox("You CAN take it with you (If you hold on tight)....", + 336,256,224); + } + { // Room 29, Help Screen + Room room = (Room) rooms.elementAt(29); + int[][] table29 = { + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table29; + room.AddTextBox("Escape from the City Sewer!", + 3*28,2*32,500); + room.AddTextBox("HINTS:", + 2*28,3*32,500); + room.AddTextBox("Observe how the robots move. Each is pre-wired to help you.", + 2*28,4*32,500); + room.AddTextBox("Robots go where humans dare not tread.", + 2*28,6*32,500); + room.AddTextBox("The key to success lies within.", + 2*28,7*32,500); + room.AddTextBox("Black crystals foil Ampire Bots.", + 2*28,8*32,500); + room.AddTextBox("Chip 1 is \"COUNT-TO-N\" Chip 2 is \"WALLHUGGER\"", + 2*28,9*32,400); + room.AddTextBox("(To continue, press RETURN.)", + 3*28,11*32,500); + } + + { // Room 30, Secret Trash-flow + Room room = (Room) rooms.elementAt(30); + int[][] table= { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + } + { // Room 31, Secret room + Room room = (Room) rooms.elementAt(31); + int[][] table= { + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Hi! I'm the Secret Helper. Congratulations on finding Secret #1 (and #2... wink wink!)", + 3*28,2*32,450); + room.AddTextBox("Look at this... Somebody threw out a perfectly good suitcase. I wonder what's inside it?", + 3*28,9*32,450); + String[] helperlist = { + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper1.gif","helper4.gif","helper2.gif","helper3.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper5.gif","helper5.gif","helper5.gif","helper5.gif", + }; + Graphix helper = new Graphix(helperlist, 4*28, 5*32); + room.graphix.addElement(helper); + Item sc = new Suitcase(14*28,5*32,room); + items.addElement(sc); + items.addElement(new Key(2*28,5*32,sc.InternalRoom,Color.green)); + } + + + int[] roomlist1 = {0,1,2,12,13,14,23,25,27,28}; + LinkRoomsHorizontally(roomlist1); + + int[] roomlist2 = {2,3,4,5,6,7,8,9,10,11}; + LinkRoomsVertically(roomlist2); + + int[] roomlist3 = {3,5,7,9}; + LinkRoomsHorizontally(roomlist3); + + int[] roomlist4 = {4,6,8,10,18,17,16,22}; + LinkRoomsHorizontally(roomlist4); + + LinkRoomsUpDown(14,15); + LinkRoomsUpDown(15,16); + + LinkRoomsUpDown(19,18); + + LinkRoomsLeftRight(19,20); + LinkRoomsLeftRight(20,15); + + LinkRoomsUpDown(17,21); + + LinkRoomsUpDown(23,24); + + LinkRoomsUpDown(25,26); + + LinkRoomsUpDown(30,31); + + + for (int a=0; a<14; a++) + { + int speed = (random.nextInt(5)+1)*2; + Graphix grx = new Graphix("junk"+a+".jpg", + 19*28, + random.nextInt(3*32)+4*32, + Graphix.CYCLE, + -speed, 0, 20*32/speed + ); + int t = random.nextInt(20*32/speed); + grx.x-=speed*t; + grx.count=t; + ((Room) rooms.elementAt(11)).graphix.addElement(grx); + } + + gameCursor = new GameCursor(252,288,(Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + helpCam = new HelpCam( (Room) rooms.elementAt(29)); + + items.addElement(gameCursor); + + SmallChip sc = new SmallChip(0,0,null,"1"); + sc.LoadChip("chips/CountToN.chip"); + items.addElement(sc); + items.addElement(new RO1Init()); + + items.addElement(solderingPen); + items.addElement(remote); + items.addElement(helpCam); + player = gameCursor; + currentViewer = player; + items.addElement(new BlackCrystal(2*28,7*32, (Room) rooms.elementAt(3))); + + } + +} + +class RO1Init extends Initializer +{ +public void Init() + { + // The Magnet and the Energy Crystal go into (one or the other) + // X=10*28, Y=9*32, Room=21 + // X=16*28, Y=5*32, Room-22 + Item magnet = level.FindItem("Magnet"); + Item crystal = level.FindItem(".Crystal"); + if (level.random.nextInt(2)==1) + { + magnet.x=10*28; + magnet.y=9*32; + magnet.room=(Room) level.rooms.elementAt(21); + crystal.x=16*28; + crystal.y=5*32; + crystal.room=(Room) level.rooms.elementAt(22); + } + else + { + crystal.x=10*28; + crystal.y=9*32; + crystal.room=(Room) level.rooms.elementAt(21); + magnet.x=16*28; + magnet.y=5*32; + magnet.room=(Room) level.rooms.elementAt(22); + } + + // The Blue Key goes inside one of the Robots. + Item robot1 = level.FindItem("BlueRobot"); + Item robot2 = level.FindItem("WhiteRobot"); + Item robot3 = level.FindItem("OrangeRobot"); + Item key = level.FindItem("Key"); + switch (level.random.nextInt(3)) + { + case 0: key.room = robot1.InternalRoom; break; + case 1: key.room = robot2.InternalRoom; break; + case 2: key.room = robot3.InternalRoom; break; + } + + // The Black Crystal and Chip 1 go somewhere in the Maze + // Room=3, 2,7 + // Room=4 4,1 + // Room=5 1,18 + // Room=6 6,6 + // Room=7 4,4 + // Room=8 16,5 + // Room=9 4,3 + // Room=10 6,8 + + Item bcrystal = level.FindItem("BlackCrystal"); + switch (level.random.nextInt(8)) + { + case 0: bcrystal.x = 2*28; bcrystal.y = 7*32; + bcrystal.room = (Room) level.rooms.elementAt(3); break; + case 1: bcrystal.x = 4*28; bcrystal.y = 1*32; + bcrystal.room = (Room) level.rooms.elementAt(4); break; + case 2: bcrystal.x = 14*28; bcrystal.y = 4*32; + bcrystal.room = (Room) level.rooms.elementAt(5); break; + case 3: bcrystal.x = 6*28; bcrystal.y = 6*32; + bcrystal.room = (Room) level.rooms.elementAt(6); break; + case 4: bcrystal.x = 4*28; bcrystal.y = 4*32; + bcrystal.room = (Room) level.rooms.elementAt(7); break; + case 5: bcrystal.x =16*28; bcrystal.y = 5*32; + bcrystal.room = (Room) level.rooms.elementAt(8); break; + case 6: bcrystal.x = 4*28; bcrystal.y = 3*32; + bcrystal.room = (Room) level.rooms.elementAt(9); break; + case 7: bcrystal.x = 6*28; bcrystal.y = 8*32; + bcrystal.room = (Room) level.rooms.elementAt(10); break; + } + + // Room=3 17,10 + // Room=4 5,2 + // Room=5 2,9 + // Room=6 17,9 + // Room=7 8,5 + // Room=8 7,9 + // Room=9 13,7 + // Room=10 5,1 + Item chip=null; + for (int a=0; a< level.items.size(); a++) + { + Item item = (Item) level.items.elementAt(a); + if (item.getClass().toString().endsWith("SmallChip")) + if (((GenericChip)item).label.endsWith("1")) + chip = item; + } + if (chip==null) + return; + switch (level.random.nextInt(8)) + { + case 0: chip.x =17*28; chip.y =10*32; + chip.room = (Room) level.rooms.elementAt(3); break; + case 1: chip.x = 5*28; chip.y = 2*32; + chip.room = (Room) level.rooms.elementAt(4); break; + case 2: chip.x = 2*28; chip.y = 9*32; + chip.room = (Room) level.rooms.elementAt(5); break; + case 3: chip.x =17*28; chip.y = 9*32; + chip.room = (Room) level.rooms.elementAt(6); break; + case 4: chip.x = 8*28; chip.y = 5*32; + chip.room = (Room) level.rooms.elementAt(7); break; + case 5: chip.x = 7*28; chip.y = 9*32; + chip.room = (Room) level.rooms.elementAt(8); break; + case 6: chip.x =13*28; chip.y = 7*32; + chip.room = (Room) level.rooms.elementAt(9); break; + case 7: chip.x = 5*28; chip.y = 1*32; + chip.room = (Room) level.rooms.elementAt(10); break; + } + } + +} \ No newline at end of file diff --git a/src/com/droidquest/levels/RO2.java b/src/com/droidquest/levels/RO2.java new file mode 100644 index 0000000..3c8d6ac --- /dev/null +++ b/src/com/droidquest/levels/RO2.java @@ -0,0 +1,997 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.decorations.Graphix; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.Handle; +import com.droidquest.items.Key; +import com.droidquest.items.Polarizer; +import com.droidquest.items.Sentry; +import com.droidquest.items.Token; +import com.droidquest.items.ToolBox; +import com.droidquest.items.Train; +import com.droidquest.items.XitTicket; +import com.droidquest.materials.CoinSlot; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; +import com.droidquest.materials.SecretReset; +import com.droidquest.materials.SecretSet; +import com.droidquest.materials.Switch; +import com.droidquest.materials.Switch1; +import com.droidquest.materials.XitSlot; + +class RO2 extends Level +{ +public RO2 (RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0= Empty Space + materials.addElement(new Material(new Color(0,204,0),false, true)); // 1= Green + materials.addElement(new Material(new Color(192,192,255),false,true)); // 2= Lt Blue + materials.addElement(new Material(new Color(255,224,192),false, true)); // 3= Brown + materials.addElement(new Material(new Color(255,128,0),false, true)); // 4= Orange + materials.addElement(new Material(new Color(255,255,255),false, true)); // 5= White + materials.addElement(new Material(new Color(0,0,255),false,true)); // 6= Blue + materials.addElement(new Material(new Color(0,0,128),false, true)); // 7= Dk Blue + materials.addElement(new Material(new Color(63,32,0),false, true)); // 8= Dk Orange + int[][] lockProgram = { + {Lock.NARROW}, + {14,5,0}, + {14,4,0}, + {Lock.REMOVE}, + {14,4,6}, + {14,5,6}}; + materials.addElement(new Lock(Color.blue, Color.blue, lockProgram)); // 9= Lock + materials.addElement(new CoinSlot()); // 10=CoinSlot + materials.addElement(new Switch1()); // 11=Switch1 + int[][] program1 = { + {Switch.WAIT4CONTACT}, + {Switch.SETVALUEHIGH}, + {Switch.REPLACE, 5,10,0, 3,4,0}, + {Switch.REPLACE, 6,10,0, 3,3,0}, + {Switch.REPLACE, 7,10,0, 3,2,0}, + {Switch.WAIT4TIME, 5}, + {Switch.REPLACE, 7,10,2, 3,2,2}, + {Switch.REPLACE, 6,10,2, 3,3,2}, + {Switch.REPLACE, 5,10,2, 3,4,2}, + {Switch.SETVALUELOW} + }; + materials.addElement(new Switch(Switch.ROT_UP, program1)); // 12=Switch2 + materials.addElement(new CrystalRecharger()); // 13=Recharger + int program2[][] = { + {Switch.WAIT4CONTACT}, + {Switch.SETVALUEHIGH}, + {Switch.REPLACE, 16,2,0, 17,2,0}, + {Switch.WAIT4TIME, 5}, + {Switch.REPLACE, 16,2,2, 17,2,2}, + {Switch.SETVALUELOW} + }; + materials.addElement(new Switch(Switch.ROT_UP, program2)); // 14=Switch3 + int program3[][] = { + {Switch.WAIT4CONTACT}, + {Switch.SETVALUEHIGH}, + {Switch.REPLACE, 16,3,0}, + {Switch.REPLACE, 16,2,0}, + {Switch.WAIT4TIME, 5}, + {Switch.REPLACE, 16,2,6}, + {Switch.REPLACE, 16,3,6}, + {Switch.SETVALUELOW} + }; + materials.addElement(new Switch(Switch.ROT_UP, program3)); // 15=Switch4 + + int program4[][] = { + {Switch.WAIT4CONTACT}, + {Switch.SETVALUEHIGH}, + {Switch.REPLACE, 1,4,0}, + {Switch.REPLACE, 2,4,0}, + {Switch.WAIT4TIME, 5}, + {Switch.REPLACE, 2,4,6}, + {Switch.REPLACE, 1,4,6}, + {Switch.SETVALUELOW} + }; + materials.addElement(new Switch(Switch.ROT_UP, program4)); // 16=Switch4 + materials.addElement(new XitSlot()); // 17=XitSlot + materials.addElement(new Portal("RO3.lvl", true, true)); // 18=Portal + materials.addElement(new SecretSet()); // 19=SecretSet + materials.addElement(new SecretReset()); // 20=SecretReset + + int program5[][] = { + {Lock.NARROW}, + {19,5,0, 19,6,0, 18,5,3, 18,6,3}, + {19,4,0, 19,7,0, 18,4,3, 18,7,3}, + {18,3,3, 18,8,3, 18,5,0, 18,6,0}, + {Lock.NARROW}, + {18,3,0, 18,8,0, 18,5,3, 18,6,3}, + {19,4,3, 19,7,3, 18,4,0, 18,7,0}, + {19,5,3, 19,6,3, 18,5,0, 18,6,0}, + }; + materials.addElement(new Lock(Color.blue, Color.blue, program5)); // 21=SecretLock1 + + int program6[][] = { + {Lock.NARROW}, + {17,5,0, 17,6,0}, + {17,4,0, 17,7,0}, + {Lock.NARROW}, + {17,4,3, 17,7,3}, + {17,5,3, 17,6,3}, + }; + materials.addElement(new Lock(Color.green, Color.green, program6)); // 22=SecretLock1 + + for (int a=0; a<41; a++) + rooms.addElement(new Room()); + + { // Room 0: Help Screen + Room room = (Room) rooms.elementAt(0); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("Ride the Subway to the Town!",4*28,64, 500); + room.AddTextBox("HINTS:",2*28,3*32, 500); + room.AddTextBox("Find the token to drop into the Turnstyle slot.",2*28,4*32, 500); + room.AddTextBox("Ride the Subway to places that no one has ever dared to go.",2*28,6*32, 500); + room.AddTextBox("Use the Exit Ticket to start the escalators going up, up, up...",2*28,8*32, 500); + room.AddTextBox("Chips 3 & 4 are blank.",2*28,10*32, 500); + room.AddTextBox("(To continue, press RETURN.)",96,350, 500); + } + { // Room 1: Escalator + Room room = (Room) rooms.elementAt(1); + int[][] table = { + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2,17, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table; + room.AddTextBox("Insert Exit Ticket",244,10*32, 100); + } + { // Room 2: Secret Room + Room room = (Room) rooms.elementAt(2); + int[][] table = { + {3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0,21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3} + }; + room.RoomArray = table; + room.AddTextBox("Congratulations!!",176,66, 560); + room.AddTextBox("You have reached the Secret Room of Public Knowledge.",2*28,4*32, 500); + room.AddTextBox("Robot Odyssey I is dedicated to Warren Robinett, author of Atari Adventure, Rocky's Boots, and the animation utility underlying Robot Odyssey I.",2*28,6*32, 500); + } + + { // Room 3: Laundrobot, Level 1 + Room room = (Room) rooms.elementAt(3); + int[][] table = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + { // Room 4: Laundrobot, Level 2 (Two Buttons) + Room room = (Room) rooms.elementAt(4); + int[][] table = { + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0}, + {0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, + {0, 0, 0, 2, 0,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2}, + {0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {0,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2} + }; + room.RoomArray = table; + } + { // Room 5: Laundrobot, Level 3 (Sentry & Xit Ticket) + Room room = (Room) rooms.elementAt(5); + int[][] table = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,6,6,6,6,6,6,0,0,6,6,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,6,0,0,0,0,6,0,0,0,0,0,6,0,0,0,6}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6}, + {6,0,0,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,6,6}, + {6,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,6,6}, + {6,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,6,6}, + {6,0,0,0,6,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6}, + {6,0,0,0,6,0,0,0,0,0,0,0,0,6,6,6,6,6,6,0}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} + }; + room.RoomArray = table; + items.addElement(new XitTicket(15*28,6*32+16,room)); + int[] pace = {11*28,7*32, 13*28,7*32}; + int[] protect = {5*28,2*32,19*28,5*32, 8*28,0, + 4*28,6*32,12*28,10*32, 0,3*32}; + items.addElement(new Sentry(11*28,7*32,room, pace, protect, true)); + } + { // Room 6: Laundrobot Station + Room room = (Room) rooms.elementAt(6); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,8,8,0,0,0,0,8,0,0,0,8}, + {8,0,0,0,8,0,0,0,8,0,0,8,0,0,0,8,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,0,8,0,0,0,8,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,8,0,0,0,0,8,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,8,0,0,0,0,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,8,0,0,0,0,8,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8} + }; + room.RoomArray = table; + room.AddTextBox("Laundrobot Station",6*28,2*32, 300); + } + + { // Room 7: Muse Robotique Station, Level 1 + Room room = (Room) rooms.elementAt(7); + int[][] table = { + {7, 7, 7, 7, 7,19, 7, 7, 7, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 7,20, 7, 0, 0, 7, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + } + { // Room 8: Muse Robotique Station, Level 2 + Room room = (Room) rooms.elementAt(8); + int[][] table = { + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0}, + {2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2}, + {0, 0, 0, 0, 0,20, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2,19, 2, 2, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0} + }; + room.RoomArray = table; + } + { // Room 9: Muse Robotique Station, Level 3 + Room room = (Room) rooms.elementAt(9); + int[][] table = { + {6, 6, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0}, + {6,16, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0}, + {6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0}, + {6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6}, + {6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6} + }; + room.RoomArray = table; + } + { // Room 10: Muse Robotique Station, Level 4 + Room room = (Room) rooms.elementAt(10); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,8,8,8,8,8}, + {8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8}, + {8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8}, + {8,8,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0} + }; + room.RoomArray = table; + room.AddTextBox("Muse Robotique Station",216,178, 200); + } + + { // Room 11: Jack in the Bot Station, Level 1 + Room room = (Room) rooms.elementAt(11); + int[][] table = { + {0,0,0,0,0,7,0,0,7,7,7,0,0,7,7,7,7,0,0,7}, + {0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + toolbox = new ToolBox(3*28, 7*32, room); + items.addElement(toolbox); + } + { // Room 12: Jack in the Bot Station, Level 2 + Room room = (Room) rooms.elementAt(12); + int[][] table = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2,14, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2}, + {2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2}, + {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0}, + {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0}, + {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0}, + {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0}, + {0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2, 2, 0, 0, 2} + }; + room.RoomArray = table; + room.AddTextBox("Subway token",28,122, 560); + room.AddArrow(0,3*32+16,Arrow.DIR_LEFT,28,Color.white); + } + { // Room 13: Big Magnet + Room room = (Room) rooms.elementAt(13); + int[][] table = { + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6}, + {0,0,0,0,0,0,0,0,6,6,6,0,6,0,0,0,0,0,6,6}, + {0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,6,6,6,0,6,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6} + }; + room.RoomArray = table; + items.addElement(new SmallChip(13*28+14, 5*32+16, room, "4")); + } + { // Room 14: Jack in the Bot Station + Room room = (Room) rooms.elementAt(14); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + room.AddTextBox("Jack in the 'Bot Station",160,178, 300); + } + + { // Room 15: Game starts here + Room room = (Room) rooms.elementAt(15); + int[][] table = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,7,7}, + {7,7,7,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,7,7}, + {7,7,7,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,0,0}, + {7,7,7,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + { // Room 16: Seer's and Robot Station, Level 2 + Room room = (Room) rooms.elementAt(16); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,2,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0}, + {2,2,2,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0}, + {2,2,2,2,2,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2}, + {2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} + }; + room.RoomArray = table; + } + { // Room 17: Token first here + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,9,6,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,6,0}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,6,0} + }; + room.RoomArray = table; + items.addElement(new Token(6*28, 8*32, room)); + int[] pace={3*28,2*32, 12*28,7*32}; + int[] protect={0,0,18*28,9*32-2,15*28,10*32}; + items.addElement(new Sentry(2*28, 2*32, room, pace, protect, true)); + } + { // Room 18: Seer's and Robot Station + Room room = (Room) rooms.elementAt(18); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,0,0,0,0,0,0,0,8,8,8,8,8,8,8}, + {8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8}, + {8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + room.AddTextBox("Seer's and Robot Station",164,178, 300); + } + + { // Room 19: Picadilly Circuit Station, Level 1 + Room room = (Room) rooms.elementAt(19); + int[][] table19 = { + {0,0,0,7,7,7,7,7,7,7,7,7,7,7,0,0,7,7,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,7,7,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,7,7,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,7,7,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0}, + {7,7,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,7}, + {0,0,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,7}, + {0,0,0,7,7,7,7,0,0,0,0,0,7,7,7,7,7,7,7,7}, + {7,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + ((Room) rooms.elementAt(19)).RoomArray = table19; + } + { // Room 20: Picadilly Circuit Station, Level 2 + Room room = (Room) rooms.elementAt(20); + int[][] table = { + {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2}, + {0,0,0,2,0,0,0,0,0,2,2,2,0,0,0,0,2,2,2,2}, + {0,0,0,2,0,0,0,0,0,0,0,2,2,2,0,0,2,2,0,0}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,2,2,0,0}, + {0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,2,2,0,0}, + {0,0,0,2,2,2,2,2,2,2,2,2,2,2,0,0,2,2,0,0} + }; + room.RoomArray = table; + } + { // Room 21: Xit Ticket sensor here + Room room = (Room) rooms.elementAt(21); + int[][] table = { + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6} + }; + room.RoomArray = table; + items.addElement(new ContactSensor(11*28,2*32,room,new XitTicket(0,0,null))); + } + { // Room 22: Picadilly Circuit Station + Room room = (Room) rooms.elementAt(22); + int[][] table = { + {8,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,8} + }; + room.RoomArray = table; + room.AddTextBox("Picadilly Circuit Station",76,178, 500); + } + + { // Room 23: Cobble Bot Station, Level 1 + Room room = (Room) rooms.elementAt(23); + int[][] table = { + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,13, 0, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + items.addElement(new SmallChip(8*28, 9*32, room, "3")); + } + { // Room 24: Entrance to Token Maze + Room room = (Room) rooms.elementAt(24); + int[][] table = { + {2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,2,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0}, + {2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,2,0,0}, + {0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0}, + {0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0}, + {0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0}, + {2,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,2,0,0}, + {2,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,2,0,0}, + {2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0}, + {2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0}, + {2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,2,0,0} + }; + room.RoomArray = table; + } + { // Room 25: Cobble Bot Square Station, Level 3 + Room room = (Room) rooms.elementAt(25); + int[][] table = { + {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0,15, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6}, + {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0}, + {6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0} + }; + room.RoomArray = table; + room.AddTextBox("Restroom",392,198, 560); + room.AddArrow(559,6*32,Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 26: Cobble Bot Square Station + Room room = (Room) rooms.elementAt(26); + int[][] table = { + {8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8}, + {8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8}, + {8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8}, + {8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + room.AddTextBox("Cobble 'Bot Square Station",160,178, 250); + } + + { // Room 27: Jack in the Bot Station, Level 1 + Room room = (Room) rooms.elementAt(27); + int[][] table = { + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0}, + {7,7,7,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + { // Room 28: Token Maze + Room room = (Room) rooms.elementAt(28); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2}, + {0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0}, + {2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0}, + {0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,2,2,2,2,2}, + {0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,2,0,0,0,0}, + {0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,2,0,0,0,0}, + {2,0,0,0,0,2,0,0,0,0,2,0,0,0,0,2,0,0,0,0}, + {2,0,0,0,0,2,0,0,0,0,2,0,0,0,0,2,0,0,0,2}, + {2,0,0,0,2,2,0,0,0,0,2,0,0,0,0,2,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + int[] pace = {11*28,10*32, 14*28,10*32}; + int[] protect = {3*28,0,10*28,11*32,0,5*32, + 10*28,0,16*28,11*32,19*28,6*32}; + items.addElement(new Sentry(0,0,room, pace,protect, true)); + } + { // Room 29: Turnstile, BART + Room room = (Room) rooms.elementAt(29); + int[][] table = { + {6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6}, + {6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0}, + {0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0}, + {0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6}, + {0, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6}, + {0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0}, + {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 6} + }; + room.RoomArray = table; + room.AddTextBox("{BIG} {000,204,000} B {BSP} {SML} {255,255,255} ay {BIG} {000,204,000} A {BSP} {SML} {255,255,255} rea {BIG} {000,204,000} R {BSP} {SML} {255,255,255} obot {BIG} {000,204,000} T {BSP} {SML} {255,255,255} ransport",2*28,58, 560); + room.AddTextBox("Insert token, please.",9*28,9*32, 200); + room.AddArrow(13*28,10*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 30: Jack in the Bot Station + Room room = (Room) rooms.elementAt(30); + int[][] table = { + {8,8,8,8,8,8,0,0,0,0,0,0,0,0,8,8,8,8,8,8}, + {8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8}, + {8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8}, + {8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8} + }; + room.RoomArray = table; + room.AddTextBox("Robotoplatz Station",216,178, 150); + } + + { // Room 31: Subway Depot, Level 1 + Room room = (Room) rooms.elementAt(31); + int[][] table = { + {7,0,0,0,0,0,7,7,7,7,7,0,0,7,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + { // Room 32: Subway Depot, Level 2 + Room room = (Room) rooms.elementAt(32); + int[][] table = { + {0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,0,0,0,0,0,0,0,2,0,0,0,0,0}, + {0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0}, + {0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0}, + {0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,2,0,2,2,2}, + {2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,2,2,2,2,2,0,0,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + } + { // Room 33: After Turnstile + Room room = (Room) rooms.elementAt(33); + int[][] table = { + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table; + } + { // Room 34: Subway Depot + Room room = (Room) rooms.elementAt(34); + int[][] table = { + {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}, + {8, 0,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8}, + {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8} + }; + room.RoomArray = table; + room.AddTextBox("SUBWAY DEPOT",408,84, 100); + room.AddTextBox("Push this button to call train.",104,2*32, 200); + room.AddTextBox("Pull here",384,206, 560); + room.AddArrow(13*28+14,5*32,Arrow.DIR_UP,32,Color.white); + items.addElement(new Handle(13*28,4*32+12,room)); + items.addElement(new Train()); + } + + { // Room 35: Secret tunnel 1 + Room room = (Room) rooms.elementAt(35); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("At last...",220,2*32,450); + } + { // Room 36: Secret tunnel 2 + Room room = (Room) rooms.elementAt(36); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("the mystery is finally revealed!",88,2*32,450); + } + { // Room 37: Secret tunnel 3 + Room room = (Room) rooms.elementAt(37); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Just what does the lock in the Secret Room of Public Knowledge open?", + 2*28,2*32,500); + } + { // Room 38: Secret tunnel 4 + Room room = (Room) rooms.elementAt(38); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("What else, but a secret passage to...",58,2*32,450); + } + { // Room 39: Secret lock + Room room = (Room) rooms.elementAt(39); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("...ANOTHER LOCK!",2*28,2*32,450); + room.AddTextBox("You DO have the green key, don't you?",58,8*32,450); + room.AddTextBox("If not, go back to the sewers and look around.",58,10*32,450); + } + { // Room 40: Secret room + Room room = (Room) rooms.elementAt(40); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Hello again! Yes, every level has a secret! Here's the key to Secret #3.", + 2*28,2*32,500); + room.AddTextBox("This Polarizer will open a door when it is hit by a random surge of energy, and the direction of the door will match the polarity of the energy.", + 2*28-8,9*32-10,500); + String[] helperlist = { + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper1.gif","helper4.gif","helper2.gif","helper3.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper5.gif","helper5.gif","helper5.gif","helper5.gif", + }; + Graphix helper = new Graphix(helperlist,14*28, 5*32); + room.graphix.addElement(helper); + items.addElement(new Polarizer(4*28,5*32,room)); + items.addElement(new Key(6*28, 5*32, room, Color.yellow)); + } + + // 1 + // 34 30 26 22 18 14 10 6 + // 33 29 25 21 17 13 9 5 + // 32 28 24 29 16 12 8 4 + // 31 27 23 19 15 11 7 3 + + int[][] roomgrid = { + {34,30,26,22,18,14,10, 6,34}, + {33,29,25,21,17,13, 9, 5,33}, + {32,28,24,20,16,12, 8, 4,32}, + {31,27,23,19,15,11, 7, 3,31}, + {34,30,26,22,18,14,10, 6,34} + }; + LinkRoomsGrid(roomgrid); + + // 14 + // 1 + // 11 + LinkRoomsUpDown(11,1); + LinkRoomsUpDown(1,14); + + int[] secretlist = {2,35,36,37,38,39,40}; + LinkRoomsHorizontally(secretlist); + + gameCursor = new GameCursor(6*28,8*32,(Room) rooms.elementAt(15)); + solderingPen = new SolderingPen(); + remote = new Remote(); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/RO3.java b/src/com/droidquest/levels/RO3.java new file mode 100644 index 0000000..849da0f --- /dev/null +++ b/src/com/droidquest/levels/RO3.java @@ -0,0 +1,911 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.decorations.Graphix; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.SmallChip; +import com.droidquest.devices.StormShield; +import com.droidquest.items.Button; +import com.droidquest.items.Crystal; +import com.droidquest.items.ElevatorKey; +import com.droidquest.items.ElevatorSwitch; +import com.droidquest.items.F12Form; +import com.droidquest.items.FFButton; +import com.droidquest.items.GateKeeper; +import com.droidquest.items.HiddenCamera; +import com.droidquest.items.Key; +import com.droidquest.items.Sentry; +import com.droidquest.items.SlipperyToken; +import com.droidquest.items.StormCloud; +import com.droidquest.items.VendingHandle; +import com.droidquest.materials.CameraDisable; +import com.droidquest.materials.CameraEnable; +import com.droidquest.materials.ElevatorInPortal; +import com.droidquest.materials.ElevatorLock; +import com.droidquest.materials.ElevatorOutPortal; +import com.droidquest.materials.Material; +import com.droidquest.materials.PlayerBlocker; +import com.droidquest.materials.Portal; +import com.droidquest.materials.ShapeEditor; +import com.droidquest.materials.SwitchA; +import com.droidquest.materials.SwitchB; +import com.droidquest.materials.VendingSlot; + +class RO3 extends Level +{ + public RO3 (RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0= Empty Space + materials.addElement(new Material(new Color(0,204,0),false, true)); // 1= Green + materials.addElement(new Material(new Color(255,224,192),false, true)); // 2= Lt Orange + materials.addElement(new Material(new Color(128,128,128),false, true)); // 3= Grey + materials.addElement(new Material(new Color(255,128,0),false, true)); // 4= Orange + materials.addElement(new Material(new Color(255,255,255),false, true)); // 5= White + materials.addElement(new Material(new Color(0,0,255),false, true)); // 6= Blue + materials.addElement(new Material(new Color(0,0,128),false,true)); // 7= Dk Blue + materials.addElement(new Material(new Color(63,32,0),false, true)); // 8= Dk Orange + materials.addElement(new ShapeEditor(new StormCloud(0,0,null))); // 9= Storm Editor + materials.addElement(new ElevatorLock()); // 10= ElevatorLock + materials.addElement(new ElevatorInPortal()); // 11= ElevatorIn + materials.addElement(new ElevatorOutPortal()); // 12= ElevatorOut + materials.addElement(new ElevatorSwitch()); // 13= ElevatorSwitch + materials.addElement(new VendingSlot()); // 14= VendingSlot + materials.addElement(new PlayerBlocker(Color.black)); // 15= PlayerBlock + materials.addElement(new SwitchA()); // 16 + materials.addElement(new SwitchB()); // 17 + materials.addElement(new CameraEnable()); // 18= Periscope + materials.addElement(new CameraDisable()); // 19 + String[] files = {"field0.jpg","field1.jpg"}; + materials.addElement(new PlayerBlocker(files)); // 20= Blue FF + materials.addElement(new Portal("RO4.lvl", true, true)); // 21= Portal + + for (int a=0; a<=36; a++) + rooms.addElement(new Room()); + + {// Room 0 : Help Screen + Room room = (Room) rooms.elementAt(0); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("Explore the Town!",164,2*32, 560); + room.AddTextBox("HINTS: Weather the magnetic storm with a shield in a 'bot. (Turn it on.)", + 2*28,4*32, 500); + room.AddTextBox("Chips 5 & 6 are blank.",2*28,6*32, 500); + room.AddTextBox("Sometimes junk can open doors...",2*28,7*32, 560); + room.AddTextBox("A Form-12 is your ticket to the Master Control Room.",2*28,8*32, 560); + room.AddTextBox("(To continue, press RETURN.)",4*28,11*32, 500); + } + {// Room 1 : Intro Maze 1 + Room room = (Room) rooms.elementAt(1); + int[][] table = { + {2,2,0,0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,2,2}, + {2,2,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2}, + {2,0,0,0,0,0,2,2,2,0,0,0,0,2,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,2,2,2,2,2,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,2,2,2,0,0,2,2,2,0,0,0,0,0,2}, + {2,2,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2}, + {2,2,0,0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,2,2} + }; + room.RoomArray = table; + room.AddTextBox("EXIT",9*28+6,196,100); + room.AddArrow(280,4*32,Arrow.DIR_UP,32,Color.white); + room.AddArrow(280,8*32,Arrow.DIR_DOWN,32,Color.white); + room.AddArrow(7*28,6*32,Arrow.DIR_LEFT,28,Color.white); + room.AddArrow(13*28,6*32,Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 2 : Intro Maze 2 + Room room = (Room) rooms.elementAt(2); + int[][] table = { + {2,2,0,0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,2,2}, + {2,2,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2}, + {2,0,0,0,0,0,2,2,2,0,0,0,0,2,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,2,2,2,2,2,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,2,2,2,0,0,2,2,2,0,0,0,0,0,2}, + {2,2,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2}, + {2,2,0,0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,2,2} + }; + room.RoomArray = table; + room.AddTextBox("EXIT",9*28+6,196,100); + room.AddArrow(280,4*32,Arrow.DIR_UP,32,Color.white); + room.AddArrow(280,8*32,Arrow.DIR_DOWN,32,Color.white); + room.AddArrow(7*28,6*32,Arrow.DIR_LEFT,28,Color.white); + room.AddArrow(13*28,6*32,Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 3 : Intro Maze 3 + Room room = (Room) rooms.elementAt(3); + int[][] table = { + {2,2,0,0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,2,2}, + {2,2,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2}, + {2,0,0,0,0,0,2,2,2,0,0,0,0,2,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,2,2,2,2,2,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,2,2,2,0,0,2,2,2,0,0,0,0,0,2}, + {2,2,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2}, + {2,2,0,0,0,2,2,0,0,0,0,0,0,2,2,0,0,0,2,2} + }; + room.RoomArray = table; + room.AddTextBox("EXIT",9*28+6,196,100); + room.AddArrow(280,4*32,Arrow.DIR_UP,32,Color.white); + room.AddArrow(280,8*32,Arrow.DIR_DOWN,32,Color.white); + room.AddArrow(7*28,6*32,Arrow.DIR_LEFT,28,Color.white); + room.AddArrow(13*28,6*32,Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 4 : Sensor Editor Room, Magnetic Shield here + Room room = (Room) rooms.elementAt(4); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Sensor Editor",64,56, 560); + room.AddTextBox("Magnetic Storm Shield (For Robots Only)",60,346, 560); + items.addElement(new StormShield(3*28, 8*32, room)); + } + {// Room 5 : Street Maze + Room room = (Room) rooms.elementAt(5); + int[][] table = { + {3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,0,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,3,3,3,3,0,0,0,0,0,3,3}, + {3,3,0,0,3,3,0,0,0,0,0,3,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,0,0,0,3,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,3,3,3,0,0,0,0,0,0,3,0,0,0,0}, + {3,3,0,0,3,3,0,0,3,0,0,0,0,0,0,3,0,0,0,0}, + {3,3,0,0,3,3,0,0,3,0,0,3,3,0,0,3,0,0,0,0}, + {3,3,0,0,0,0,0,0,3,0,0,3,3,0,0,3,0,0,0,0}, + {3,3,0,0,0,0,0,0,3,0,0,3,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,0,0,3,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,0,0,3,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,0,0,3,3,0,0,0,0,0,3,3} + }; + room.RoomArray = table; + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + } + {// Room 6 : Street Maze + Room room = (Room) rooms.elementAt(6); + int[][] table = { + {3,3,0,0,3,3,0,0,3,0,0,3,3,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,3,0,0,3,3,0,0,0,0,0,3,3}, + {3,3,0,0,0,0,0,0,3,0,0,3,3,0,0,3,3,3,3,3}, + {3,3,0,0,3,3,0,0,3,0,0,0,0,0,0,3,0,0,3,3}, + {0,0,0,0,3,3,0,0,3,0,0,0,0,0,0,3,0,0,3,3}, + {0,0,0,0,3,3,0,0,3,0,0,3,3,3,3,3,0,0,3,3}, + {0,0,0,0,3,3,0,0,3,0,0,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,3,3,0,0,0,0,0,3,3,0,0,0,0,0,3,3}, + {3,3,3,3,3,3,0,0,0,0,0,3,3,0,0,0,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,0,0,0,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,0,0,0,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,3,0,0,3,0,0,3,0,0,3,3} + }; + room.RoomArray = table; + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + } + {// Room 7 : Street Maze + Room room = (Room) rooms.elementAt(7); + int[][] table = { + {3,3,0,0,3,3,0,0,3,3,0,0,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,3,0,0,0,3}, + {3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,3,3,0,0,3}, + {3,3,0,0,3,3,0,0,3,3,3,3,3,0,0,0,0,0,0,3}, + {3,3,0,0,3,3,0,0,3,0,0,3,3,0,0,0,0,0,0,0}, + {3,3,0,0,3,3,3,3,3,0,0,3,3,0,0,3,3,0,0,0}, + {3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,3,3,0,0,0}, + {3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,3,3,0,0,0}, + {3,3,0,0,3,3,0,0,3,3,3,3,3,0,0,3,3,3,3,3}, + {3,3,3,3,3,3,0,0,3,0,0,3,3,0,0,3,3,3,3,3}, + {3,0,0,0,3,3,0,0,3,0,0,3,3,0,0,3,3,0,0,3}, + {3,0,0,0,3,3,0,0,3,0,0,3,3,0,0,3,3,0,0,3} + }; + room.RoomArray = table; + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + } + {// Room 8 : Brown Tunnel + Room room = (Room) rooms.elementAt(8); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + } + {// Room 9 : Lower Elevator, Trash Pile + Room room = (Room) rooms.elementAt(9); + int[][] table = { + {7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,11,11, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,11,11, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 7, 7, 7, 7, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {7, 7, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + room.AddTextBox("ELEVATOR",9*28,152, 560); + room.AddTextBox("The things robots throw away...",0,6*32, 200); + room.AddArrow(14*28,4*32+16,Arrow.DIR_RIGHT,28,Color.white); + items.addElement(new ElevatorKey(1*28,9*32,room)); + String[] filelist = {"trash0.gif","trash1.gif","trash2.gif","trash3.gif"}; + room.graphix.addElement(new Graphix(filelist,28,8*32)); + } + {// Room 10 : Stairs, Sentry + Room room = (Room) rooms.elementAt(10); + int[][] table = { + {7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,0,0,0,0,0,0,7,7,7,7,7,7} + }; + room.RoomArray = table; + room.AddTextBox("Use elevator.",8*28,10*32, 560); + int[] pace = {6*28,2*32, 6*28,8*32}; + int[] pounce = {5*28,3*32,14*28,5*32, 12*28,0, + 5*28,6*32,14*28,8*32, 9*28,11*32}; + items.addElement(new Sentry(7*28,2*32,room,pace,pounce, true)); + } + {// Room 11 : Upper Elevator, Top of Stairs + Room room = (Room) rooms.elementAt(11); + int[][] table = { + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + items.addElement(new Crystal(7*28,4*32,room,100000)); + } + {// Room 12 : Vending Machine + Room room = (Room) rooms.elementAt(12); + int[][] table = { + {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7,14,14,14,14,14,14,14,14,14, 7, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + room.AddTextBox("..........................................",28,274, 560); + room.AddTextBox("1) Insert Token ",112,6*32, 560); + room.AddTextBox("2) Pull ",308,96, 560); + room.AddTextBox("VENDING MACHINE",48,50, 560); + room.AddArrow(3*28,5*32,Arrow.DIR_UP,32,Color.white); + room.AddArrow(11*28+22,4*32+4,Arrow.DIR_DOWN,30,Color.white); + items.addElement(new VendingHandle(11*28,4*32+10,room)); + items.addElement(new F12Form(3*28, 2*32, room)); + } + {// Room 13 : Blue Maze : Button Room + Room room = (Room) rooms.elementAt(13); + int[][] table = { + { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + { 7, 0, 0, 0, 7, 7, 7, 7, 0, 0, 0, 0, 7, 7, 7, 7, 0, 0, 0, 7}, + { 7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7}, + {20, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7}, + {20, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7}, + {20, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7}, + { 7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7}, + { 7, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 7}, + { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + { 7, 7, 7, 7, 7, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + items.addElement(new HiddenCamera(room)); + items.addElement(new FFButton(10*28, 5*32, room)); + } + {// Room 14 : Blue Maze + Room room = (Room) rooms.elementAt(14); + int[][] table = { + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7} + }; + room.RoomArray = table; + } + {// Room 15 : Blue Maze + Room room = (Room) rooms.elementAt(15); + int[][] table = { + {7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + {// Room 16 : Street Maze + Room room = (Room) rooms.elementAt(16); + int[][] table = { + {3,3,0,0,3,3,0,0,3,3,0,0,3,0,0,3,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,0,0,0,3,0,0,3,0,0,3,3}, + {3,0,0,0,3,3,0,0,3,0,0,3,3,0,0,3,0,0,3,3}, + {3,0,0,3,3,3,0,0,3,0,0,3,3,0,0,3,0,0,3,3}, + {3,0,0,3,3,3,0,0,3,0,0,0,0,0,0,3,0,0,0,0}, + {3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,3,0,0,0,0}, + {3,0,0,0,0,0,0,0,3,0,0,0,0,3,3,3,3,0,0,0}, + {3,3,3,3,0,0,3,3,3,3,3,0,0,3,0,0,3,0,0,0}, + {3,0,0,3,0,0,3,3,0,0,3,0,0,3,3,3,3,0,0,3}, + {3,0,0,3,0,0,3,3,0,0,3,0,0,0,0,0,0,0,0,3}, + {3,0,0,3,0,0,3,3,0,0,3,0,0,0,0,0,0,0,0,3}, + {3,0,0,3,0,0,3,3,0,0,3,0,0,3,3,0,0,3,3,3} + }; + room.RoomArray = table; + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + } + {// Room 17 : Street Maze + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {3,0,0,3,0,0,3,3,0,0,3,0,0,3,3,0,0,3,3,3}, + {3,0,0,3,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,3}, + {3,0,0,3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,3}, + {3,0,0,3,3,3,0,0,3,3,0,0,3,0,0,0,0,0,0,3}, + {0,0,0,3,0,3,0,0,3,3,0,0,3,0,0,3,3,3,3,3}, + {0,0,0,3,3,3,0,0,3,3,0,0,3,0,0,3,0,0,3,3}, + {0,0,3,0,0,3,3,3,3,3,0,0,0,0,0,3,0,0,3,3}, + {0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,3,3}, + {3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,3,0,0,3,3,0,0,0,0,0,0,3,0,0,0,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,3,3,3,3,0,0,0,0,0,3,3}, + {3,3,0,0,3,3,0,0,3,3,0,0,3,0,0,3,0,0,3,3} + }; + room.RoomArray = table; + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + } + {// Room 18 : Street Maze + Room room = (Room) rooms.elementAt(18); + int[][] table = { + {3,0,0,0,3,3,0,0,3,0,0,3,3,0,0,3,3,0,0,3}, + {3,3,3,3,3,3,0,0,0,0,0,0,3,0,0,0,3,0,0,3}, + {3,0,0,0,0,0,3,0,0,0,0,0,3,0,0,0,3,0,0,3}, + {3,0,0,0,0,0,3,0,0,3,0,0,3,3,3,3,3,0,0,3}, + {3,0,0,3,0,0,3,3,3,3,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,3,0,0,3,0,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,0,0,3,0,0,3,0,0,3,0,0,3,0,0,0,0,0,0,3}, + {3,0,0,3,0,0,0,0,0,3,0,0,0,0,0,0,3,0,0,3}, + {3,0,0,3,0,0,0,0,0,3,0,0,0,0,0,0,3,0,0,3}, + {3,0,0,3,0,0,0,0,0,3,0,0,0,3,3,3,3,0,0,3}, + {3,0,0,3,3,3,3,3,3,3,3,3,3,3,0,0,3,0,0,3} + }; + room.RoomArray = table; + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new SmallChip(28+14, 2*32+16, room, "6")); + } + {// Room 19 : Street Tunnel + Room room = (Room) rooms.elementAt(19); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + } + {// Room 20 : Blue Maze + Room room = (Room) rooms.elementAt(20); + int[][] table = { + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,0,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,0,0,0,0,0,7,7,0,0,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,0,0,7,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,7,7,7,7,0,0,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + {// Room 21 : Blue Maze + Room room = (Room) rooms.elementAt(21); + int[][] table = { + {7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,7,0,0,0,0,7,0,0,0,0,7}, + {7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7} + }; + room.RoomArray = table; + items.addElement(new SmallChip(10*28, 3*32, room, "5")); + } + {// Room 22 : Blue Maze + Room room = (Room) rooms.elementAt(22); + int[][] table = { + {7,7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,7,0,0,0,7,0,0,0,0,0,0,0,0,0,7}, + {0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,7}, + {0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,0,0,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7} + }; + room.RoomArray = table; + items.addElement(new ContactSensor(13*28,8*32,room, + new Key(0,0,null, Color.blue))); + } + {// Room 23 : Blue Maze : 2 buttons + Room room = (Room) rooms.elementAt(23); + int[][] table = { + {7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7,16, 0, 0, 0, 0, 0, 0, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7}, + {0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0}, + {0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7}, + {7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7,17, 0, 0, 0, 0, 0, 0, 7}, + {7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + room.AddTextBox("Two buttons a day keep the sentry away.",148,5*32, 250); + int[] pace = {3*28,4*32, 3*28,9*32}; + int[] protect = {4*28,1*32, 6*28,3*32, 0,2*32, + 4*28,3*32, 6*28,9*32, 0,6*32, + 4*28,9*32, 6*28,11*32, 0,9*32}; + items.addElement(new Sentry(3*28,3*32,room,pace,protect, true)); + } + {// Room 24 : Blue Maze: Button Anteroom + Room room = (Room) rooms.elementAt(24); + int[][] table = { + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7}, + {7, 0, 0, 0, 7, 7, 7, 7, 0, 0, 0, 0, 7, 7, 7, 7, 0, 0, 0, 7}, + {7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7}, + {0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,20}, + {0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,20}, + {0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,20}, + {7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7}, + {7, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,19,19, 7}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,19,18, 7}, + {7, 7, 7, 7, 7, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table; + room.AddTextBox("Look into the next room.",14*28,9*32+16, 150); + room.AddArrow(17*28, 10*32+16, Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 25 : Blue Maze + Room room = (Room) rooms.elementAt(25); + int[][] table = { + {7,7,7,7,7,7,7,7,7,0,0,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,0,0,7,0,0,0,0,0,0,0,7}, + {7,7,0,0,0,0,0,7,7,0,0,7,7,7,7,7,7,7,7,7}, + {7,7,0,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,0,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + {// Room 26 : Blue Maze + Room room = (Room) rooms.elementAt(26); + int[][] table = { + {7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,7,7,7,7,7}, + {7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + {// Room 27 : Blue Maze + Room room = (Room) rooms.elementAt(27); + int[][] table = { + {7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0,0,7,7}, + {7,7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7}, + {7,7,7,7,7,7,0,0,0,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + } + {// Room 28 : Brown Tunnel + Room room = (Room) rooms.elementAt(28); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + } + {// Room 29 : Blue Maze : Form Taker + Room room = (Room) rooms.elementAt(29); + int[][] table = { + {7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,0,0,7,7}, + {7,7,7,0,0,0,0,0,0,0,7,7,0,0,0,7,0,0,7,7}, + {7,7,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {7,7,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {7,7,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,7,7}, + {7,7,7,0,0,0,0,0,0,0,7,7,0,0,0,7,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,0,0,7,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,7,0,0,7,7} + }; + room.RoomArray = table; + room.AddTextBox("Submit a Form-12, please.",3*28,3*32, 150); + room.AddTextBox(" OFFICIAL GATEKEEPER",112,9*32, 200); + room.AddGraphix("trashcan.gif",2*28, 8*32); + items.addElement(new GateKeeper(7*28,4*32,room)); + items.addElement(new DirectionalSensor(16*28,5*32,room, + new Button(0,0,null,Color.white))); + } + {// Room 30 : Blue Maze + Room room = (Room) rooms.elementAt(30); + int[][] table = { + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0}, + {7,0,0,0,7,0,0,0,7,7,7,0,0,0,0,7,7,7,7,7}, + {7,0,0,0,7,0,0,0,7,0,7,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,0,0,0,7,0,7,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,7,0,7,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,7,0,7,0,0,0,0,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,7,0,7,0,0,0,0,7,0,0,0,7}, + {7,0,0,0,7,0,0,0,7,7,7,0,0,0,0,7,0,0,0,7}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7} + }; + room.RoomArray = table; + items.addElement(new DirectionalSensor(6*28,3*32,room,new Key(0,0,null,Color.blue))); + } + {// Room 31 : Blue Maze + Room room = (Room) rooms.elementAt(31); + int[][] table = { + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,7,7,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7} + }; + room.RoomArray = table; + } + {// Room 32 : Blue Maze + Room room = (Room) rooms.elementAt(32); + int[][] table = { + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7}, + {7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0} + }; + room.RoomArray = table; + } + {// Room 33 : Brown Tunnel + Room room = (Room) rooms.elementAt(33); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + } + {// Room 34 : Street Maze : Token + Room room = (Room) rooms.elementAt(34); + int[][] table = { + {3,0,0,3,3,3,3,3,3,3,3,3,3,3,0,0,3,0,0,3}, + {3,0,0,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,0,0,0,3,3} + }; + room.RoomArray = table; + room.AddTextBox("I never could hang onto money...",3*28,152, 560); + items.addElement(new SlipperyToken(3*28, 3*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + items.addElement(new StormCloud(10*28, 6*32, room)); + } + {// Room 35 : Elevator + Room room = (Room) rooms.elementAt(35); + int[][] table = { + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 4, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4}, + { 4, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 4, 4, 4, 4, 4, 0, 0, 0, 4}, + { 4, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 4}, + { 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + { 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + { 4,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4} + }; + room.RoomArray = table; + room.AddArrow(10*28-2,66,Arrow.DIR_UP,28,Color.green); + room.AddArrow(10*28-1,66,Arrow.DIR_UP,28,Color.green); + room.AddArrow(10*28,66,Arrow.DIR_UP,28,Color.green); + room.AddArrow(10*28+1,66,Arrow.DIR_UP,28,Color.green); + room.AddArrow(10*28+2,66,Arrow.DIR_UP,28,Color.green); + }; + + {// Room 36 : Secret room + Room room = (Room) rooms.elementAt(36); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Good work! You Found me again!", + 2*28,2*32, 500); + room.AddTextBox("You may find this hard to swallow, but there is no key to Secret #4. Just ride a robot through one of the challanges.", + 2*28,4*32, 500); + String[] helperlist = { + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper1.gif","helper4.gif","helper2.gif","helper3.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper5.gif","helper5.gif","helper5.gif","helper5.gif", + }; + Graphix helper = new Graphix(helperlist,15*28, 8*32); + room.graphix.addElement(helper); + items.addElement(new Crystal(2*28,8*32,room,100000)); + items.addElement(new Key(2*28,9*32,room,Color.red)); + } + + // Intro Maze + LinkRoomsUpDown(1,2); + LinkRoomsUpDown(2,3); + LinkRoomsUpDown(3,1); + LinkRoomsLeftRight(1,3); + LinkRoomsLeftRight(3,1); + + // Exit from Intro Maze + int[] roomlist1={4,2,33,6}; + LinkRoomsHorizontally(roomlist1); + + // Main Street + int[] roomlist2={5,6,16,17,7,18,34,5}; + LinkRoomsVertically(roomlist2); + + // Entrance to lower Elevator + LinkRoomsLeftRight(5,8); + LinkRoomsLeftRight(8,9); + + // Stairs to vending machine + int[] roomlist3={12,11,10,9}; + LinkRoomsVertically(roomlist3); + + // Tunnel through Street Maze + LinkRoomsLeftRight(16,19); + LinkRoomsLeftRight(19,17); + + // Blue Maze + int[][] roomgrid = { + {30,20,21,14,22,30}, + {31,23,24,13,29,31}, + {32,25,26,15,27,32}, + {30,20,21,14,22,30} + }; + LinkRoomsGrid(roomgrid); + + // Tunnel to Blue Maze + LinkRoomsLeftRight(7,28); + LinkRoomsLeftRight(28,31); + + gameCursor = new GameCursor(10*28,6*32,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/RO4.java b/src/com/droidquest/levels/RO4.java new file mode 100644 index 0000000..a149f01 --- /dev/null +++ b/src/com/droidquest/levels/RO4.java @@ -0,0 +1,1100 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Graphix; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.CamDisk; +import com.droidquest.items.Disk; +import com.droidquest.items.EnergyButton; +import com.droidquest.items.Key; +import com.droidquest.items.MasterRobot; +import com.droidquest.items.NotAButton; +import com.droidquest.items.SpyCam; +import com.droidquest.items.Switch4A; +import com.droidquest.items.Switch4B; +import com.droidquest.items.Switch4C; +import com.droidquest.items.Switch4D; +import com.droidquest.items.TrashCollector; +import com.droidquest.materials.AntiPlayer; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.ElevatorDoor; +import com.droidquest.materials.ForceField; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.MineField; +import com.droidquest.materials.Monitor; +import com.droidquest.materials.PlayerBlocker; +import com.droidquest.materials.Portal; + +class RO4 extends Level +{ +public RO4 (RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0=Empty Space + materials.addElement(new Material(new Color(0,204,0),false, true)); // 1=green + materials.addElement(new Material(new Color(128,128,128),false, true)); // 2=grey + materials.addElement(new Material(new Color(0,0,255),false, true)); // 3=blue + materials.addElement(new Material(new Color(255,128,0),false, true)); // 4=orange + materials.addElement(new Material(new Color(255,255,255),false, true)); // 5=white + materials.addElement(new Material(new Color(0,0,128),false, true)); // 6=dk blue + materials.addElement(new Material(new Color(192,192,255),false, true)); // 7=grey-blue + materials.addElement(new MineField()); // 8=Minefield + materials.addElement(new Material(new Color(255,224,192),false, true)); // 9= + materials.addElement(new Material(new Color(63,32,0),false, true)); // 10=dk orange + materials.addElement(new Material(new Color(128,128,128),false, true)); // 11=grey + materials.addElement(new Monitor()); // 12=monitor + materials.addElement(new CrystalRecharger()); // 13=Recharger + materials.addElement(new PlayerBlocker(Color.black)); // 14=FF (Energy) + materials.addElement(new ElevatorDoor()); // 15=ElevatorDoor + materials.addElement(new AntiPlayer()); // 16=AntiPlayer + String[] grillwork = {"ventgrill.gif"}; + materials.addElement(new PlayerBlocker(grillwork)); // 17=VentGrill + int[][] lockProgram1 = { + {Lock.WIDE}, + {17,9,0, 17,10,0}, + {16,9,0, 16,10,0}, + {15,9,0, 15,10,0}, + {Lock.REMOVE}, + {15,9,9, 15,10,9}, + {16,9,9, 16,10,9}, + {17,9,9, 17,10,9} + }; + materials.addElement(new Lock(new Color(255,128,0), + Color.blue, lockProgram1)); // 18= Lock1 + int[][] lockProgram2 = { + {Lock.NARROW}, + {2,3,0}, + {Lock.REMOVE}, + {2,3,9} + }; + materials.addElement(new Lock(new Color(255,128,0), + Color.blue, lockProgram2)); // 19= Lock1 + materials.addElement(new ForceField("OrangeRobot", + new Color(255,128,0))); // 20=OrangeFF + materials.addElement(new ForceField("WhiteRobot", Color.white)); // 21=WhiteFF + materials.addElement(new ForceField("BlueRobot", Color.blue)); // 22=BlueFF + materials.addElement(new Switch4A()); // 23=Switch + materials.addElement(new Switch4B()); // 24=Switch + materials.addElement(new Switch4C()); // 25=Switch + materials.addElement(new Switch4D()); // 26=Switch + materials.addElement(new Portal("RO5.lvl",true, true)); // 27=Portal + + int[][] lockProgram3 = { + {Lock.NARROW}, + {9,11,0, 10,11,0}, + {8,11,0, 11,11,0}, + {Lock.NARROW}, + {8,11,5, 11,11,5}, + {9,11,5, 10,11,5}, + }; + materials.addElement(new Lock(Color.red,Color.red, lockProgram3)); // 28= Lock1 + + for(int a = 0; a<62; a++) + rooms.addElement(new Room()); + + String[] camFiles = { + "cam0.gif", + "cam0.gif", + "cam1.gif", + "cam1.gif", + "cam2.gif", + "cam2.gif", + "cam1.gif", + "cam1.gif" + }; + Graphix camGraphix = new Graphix(camFiles, 28,32); + + + {// Room 0 : Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,1); + room.AddTextBox("MASTER COMPUTER CENTER",136,64, 560); + room.AddTextBox("HINTS:",2*28,3*32, 560); + room.AddTextBox("A central robot can become your friend.",4*28,4*32, 400); + room.AddTextBox("The Sweeper 'Bot likes to keep the hallways clean.",4*28,6*32+16, 400); + room.AddTextBox("Chips 7 & 8 are blank.",4*28,9*32, 400); + room.AddTextBox("(To continue, press RETURN.)",4*28,11*32, 560); + } + {// Room 1 : Master Computer Help + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,3); + room.AddTextBox("THE MASTER COMPUTER",6*28,2*32, 500); + room.AddTextBox("The master computer controls many of the features of Robotropolis.", + 72,4*32, 480); + room.AddTextBox("Use the cameras to monitor robot progress.", + 72,6*32, 500); + room.AddTextBox("The computer can be turned off and the robot released by pressing the four buttons.", + 72,8*32, 450); + room.AddTextBox("(To continue, press RETURN.)",4*28,11*32, 560); + + } + {// Room 2 : Minefield Help + Room room = (Room) rooms.elementAt(2); + room.SetMaterialFromRoom(1); + room.AddTextBox("THE MINEFIELD",6*28,2*32,450); + room.AddTextBox("The walls in the map room are in the same position as the mines in the minefield.", + 2*28,3*32,500); + room.AddTextBox("Mines are set off when a robot thrusts against them for more than an instant.", + 2*28,6*32,500); + room.AddTextBox("Additional mines keep out non-robots.",2*28,8*32,500); + room.AddTextBox("Robot communication is helpful.",2*28,9*32,500); + room.AddTextBox("(To continue, press RETURN.)",4*28,11*32, 560); + } + {// Room 3 : Force Field Help + Room room = (Room) rooms.elementAt(3); + room.SetMaterialFromRoom(1); + room.AddTextBox("THE FORCE FIELD TUNNEL",6*28,2*32,500); + room.AddTextBox("Robot relays pass key items along.", 2*28,4*32,500); + room.AddTextBox("Plan ahead for the return journey.",2*28,6*32,500); + room.AddTextBox("(To continue, press RETURN.)",4*28,11*32, 560); + } + {// Room 4 : Ventilation Shaft Help + Room room = (Room) rooms.elementAt(4); + room.SetMaterialFromRoom(1); + room.AddTextBox("THE VENTILATION SHAFT",6*28,2*32,500); + room.AddTextBox("Counting chips can pick out air tubes.", 2*28,4*32,500); + room.AddTextBox("Be sure to pick the right tube.",2*28,6*32, 560); + room.AddTextBox("(To continue, press RETURN.)",4*28,11*32, 560); + } + {// Room 5 : Top Left Corridor + Room room = (Room) rooms.elementAt(5); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,0,4,11,3); + room.SetMaterialFill(15,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 6 : Top Corridor + Room room = (Room) rooms.elementAt(6); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 7 : Top Corridor + Room room = (Room) rooms.elementAt(7); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 8 : Top Corridor, Entance to Map Room + Room room = (Room) rooms.elementAt(8); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,7,11,3); + room.SetMaterialFill(12,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 9 : Top Corridor + Room room = (Room) rooms.elementAt(9); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 10 : Top Corridor + Room room = (Room) rooms.elementAt(10); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 11 : Top Right Corridor + Room room = (Room) rooms.elementAt(11); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(15,0,19,11,3); + room.SetMaterialFill(0,9,4,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 12 : Right Corridor, Exit from Map Room + Room room = (Room) rooms.elementAt(12); + int[][] table = { + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 13 : Right Corridor + Room room = (Room) rooms.elementAt(13); + int[][] table = { + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3} + }; + room.RoomArray = table; + ((Room) rooms.elementAt(15)).RoomArray = table; + ((Room) rooms.elementAt(33)).RoomArray = table; + ((Room) rooms.elementAt(35)).RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 14 : Right Corridor, Key Tunnel + Room room = (Room) rooms.elementAt(14); + int[][] table = { + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3} + }; + room.RoomArray = table; + ((Room) rooms.elementAt(16)).RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 15 : Right Corridor + Room room = (Room) rooms.elementAt(15); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 16 : Right Corridor, Main Office + Room room = (Room) rooms.elementAt(16); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 17 : Bottom Right Corridor + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 18 : Bottom Corridor + Room room = (Room) rooms.elementAt(18); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 19 : Bottom Corridor, Entrance + Room room = (Room) rooms.elementAt(19); + room.SetMaterialFill(0,0,7,2,3); + room.SetMaterialFill(12,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + items.addElement(new TrashCollector(266,176,room)); + } + {// Room 20 : Ventilation Shaft Maze + Room room = (Room) rooms.elementAt(20); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5}, + {0,0,0,0,0,5,0,0,0,0,0,0,0,5,5,0,0,0,0,5}, + {0,0,0,0,0,5,0,0,0,0,0,0,0,5,5,0,0,0,0,5}, + {5,5,0,0,0,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5}, + {0,0,0,0,0,5,0,0,0,5,5,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,5,0,0,0,5,5,0,0,0,0,0,0,0,0,0}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,5,5,5,5}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,5,5,5,5}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,5,5,5,5}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,0}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,0}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} VENTILATION SHAFT",126,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 21 : Ventilation Shaft Exit (Entrance to Master Chamber) + Room room = (Room) rooms.elementAt(21); + room.SetMaterialFill(0,0,19,1,3); + room.SetMaterialFill(0,0,2,11,3); + room.SetMaterialFill(17,0,19,4,3); + room.SetMaterialFill(17,8,19,11,3); + room.SetMaterialFill(7,10,19,11,3); + room.SetMaterialFill(19,5,19,8,17); + room.AddTextBox("{BIG} {000,204,000} NORTH CHAMBER", 98,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 22 : Key Tunnel, Bottom Right + Room room = (Room) rooms.elementAt(22); + room.SetMaterialFill(0,0,14,1,3); + room.SetMaterialFill(18,0,19,11,3); + room.SetMaterialFill(0,10,19,11,3); + room.AddTextBox("{BIG} {000,204,000} TUNNEL BYPASS",104,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 23 : Key Tunnel, Bottom Left + Room room = (Room) rooms.elementAt(23); + room.SetMaterialFill(0,0,2,11,3); + room.SetMaterialFill(0,10,19,11,3); + room.SetMaterialFill(5,0,19,1,3); + room.AddTextBox("{BIG} {000,204,000} TUNNEL BYPASS",104,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 24 : Upper Library + Room room = (Room) rooms.elementAt(24); + room.SetMaterialFill(0,0,19,0,3); + room.SetMaterialFill(0,0,0,3,3); + room.SetMaterialFill(0,7,0,11,3); + room.SetMaterial(19,11,3); + room.AddTextBox("{BIG} {000,204,000} LIBRARY",185,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 25 : Library, entrance to Ventilation Shaft + Room room = (Room) rooms.elementAt(25); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialFill(0,1,0,10,0); + room.SetMaterialFill(19,5,19,6,17); + room.AddTextBox("{BIG} {000,204,000} LIBRARY",185,708, 560); + room.graphix.addElement(camGraphix); + items.addElement(new Disk(17*28,3*32,room,Color.blue,4)); + } + {// Room 26 : Lower Library + Room room = (Room) rooms.elementAt(26); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialFill(1,0,18,0,0); + room.SetMaterialFill(19,7,19,9,0); + room.AddTextBox("{BIG} {000,204,000} LIBRARY",185,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 27 : Computer Room + Room room = (Room) rooms.elementAt(27); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialFill(0,7,0,9,0); + room.SetMaterial(10,2,12); + room.AddTextBox("{BIG} {000,204,000} COMPUTER ROOM",104,708, 560); + room.AddGraphix("monitor.gif",8*28,2*32); + room.graphix.addElement(camGraphix); + items.addElement(new CamDisk(2*28,9*32,room)); + items.addElement(new SpyCam(room)); + } + {// Room 28 : Bottom Corridor, Entrance + Room room = (Room) rooms.elementAt(28); + room.SetMaterialFill(0,0,7,2,3); + room.SetMaterialFill(12,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 29 : Bottom Corridor + Room room = (Room) rooms.elementAt(29); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 30 : Bottom Corridor + Room room = (Room) rooms.elementAt(30); + room.SetMaterialFill(0,0,19,2,3); + room.SetMaterialFill(0,9,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 31 : Bottom Left Corridor + Room room = (Room) rooms.elementAt(31); + room.SetMaterialFill(0,0,4,11,3); + room.SetMaterialFill(0,9,19,11,3); + room.SetMaterialFill(15,0,19,2,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 32 : Left Corridor, Entrance to Elevator + Room room = (Room) rooms.elementAt(32); + room.SetMaterialFill(0,0,4,11,3); + room.SetMaterialFill(15,0,19,3,3); + room.SetMaterialFill(15,7,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 33 : Left Corridor + Room room = (Room) rooms.elementAt(33); + room.SetMaterialFill(0,0,4,11,3); + room.SetMaterialFill(15,0,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 34 : Left Corridor, Entrance to Minefield + Room room = (Room) rooms.elementAt(34); + room.SetMaterialFill(0,0,4,11,3); + room.SetMaterialFill(15,0,19,6,3); + room.SetMaterialFill(15,10,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 35 : Left Corridor + Room room = (Room) rooms.elementAt(35); + room.SetMaterialFill(0,0,4,11,3); + room.SetMaterialFill(15,0,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 36 : Master Chamber + Room room = (Room) rooms.elementAt(36); + int[][] table = { + {4, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4,26, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0}, + {4, 0, 0, 0,25, 0, 0, 4, 4, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 4}, + {4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4}, + {4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 4, 0, 0,23, 0, 0, 0, 4}, + {0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4}, + {0, 0, 0, 0, 0, 0, 0,24, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4}, + {0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MASTER COMPUTER", 37,708, 560); + room.graphix.addElement(camGraphix); + items.addElement(new MasterRobot(9*28,5*32+12,room)); + } + {// Room 37 : Left Corridor, Entrance to Library + Room room = (Room) rooms.elementAt(37); + room.SetMaterialFill(0,0,4,11,3); + room.SetMaterialFill(15,0,19,3,3); + room.SetMaterialFill(15,7,19,11,3); + room.AddTextBox("{BIG} {000,204,000} HALLWAY",180,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 38 : Map Antechamber + Room room = (Room) rooms.elementAt(38); + int[][] table = { + {6,6,6,6,6,6,6,6,0,0,0,0,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,0,0,0,0,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MAP ANTEROOM",118,708, 560); + room.graphix.addElement(camGraphix); + items.addElement(new Disk(6*28,8*32,room,Color.yellow,2)); + } + {// Room 39 : Map Room, Top Left + Room room = (Room) rooms.elementAt(39); + int[][] table = { + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,6,0,0,0,6,0,0,0,0,6,6,6,6,6,0,0}, + {6,0,0,0,0,0,0,0,6,0,0,0,0,6,6,6,6,6,0,0}, + {6,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0}, + {6,0,0,0,6,0,0,0,6,6,6,6,6,6,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,6,6,6,6,6,6,0,0,0,0,0,6} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD MAP",104,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 40 : Main Office + Room room = (Room) rooms.elementAt(40); + int[][] table = { + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7}, + {7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MAIN OFFICE",131,708, 560); + items.addElement(new Disk(17*28,2*32,room,Color.red,1)); + room.graphix.addElement(camGraphix); + } + {// Room 41 : Map Room, Top Right + Room room = (Room) rooms.elementAt(41); + int[][] table = { + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,6}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,6,0,0,0,0,6,6,6,6,6,0,0,0,0,0,0}, + {0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD MAP",104,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 42 : Minefield, Bottom Left + Room room = (Room) rooms.elementAt(42); + int[][] table = { + {8,0,0,0,0,0,0,0,8,8,8,8,8,8,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,0,0,0,8,8,8,8,8,8,0,0,0,0,0,0,0,8,0,0}, + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0}, + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0}, + {8,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,8,0,0}, + {8,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,8,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD",159,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 43 : Minefield, Bottom Right + Room room = (Room) rooms.elementAt(43); + int[][] table = { + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,8,0,0,0,0,8,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,8,8,8,8,8,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,8}, + {0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,8,8,8,8,0,0,0,0,0,0,0,0,0,8,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD",159,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 44 : Minefield, Top Left + Room room = (Room) rooms.elementAt(44); + int[][] table = { + { 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + { 8,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0}, + { 8,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0}, + { 8,0,0,0,8,0,0,0,8,0,0,0,0,8,8,8,8,8,0,0}, + { 8,0,0,0,0,0,0,0,8,0,0,0,0,8,8,8,8,8,0,0}, + { 8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0}, + { 8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0}, + {16,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {16,0,0,0,8,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0}, + {16,0,0,0,8,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0}, + { 8,0,0,0,8,0,0,0,8,8,8,8,8,8,0,0,0,0,0,8}, + { 8,0,0,0,0,0,0,0,8,8,8,8,8,8,0,0,0,0,0,8} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD",159,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 45 : Minefield, Top Right + Room room = (Room) rooms.elementAt(45); + int[][] table = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,8}, + {0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,8,0,0,0,0,8,8,8,8,8,0,0,0,0,0,0}, + {0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD",159,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 46 : Key Tunnel, Top Left + Room room = (Room) rooms.elementAt(46); + int[][] table = { + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9, 9, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {9, 9, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {0, 0, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {9, 9, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {9, 9, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {9, 9, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {9, 9, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {9, 9, 9, 0, 0, 0, 0, 0,20, 0, 0, 0,21, 0, 0, 0,21, 0, 0, 0}, + {9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9, 9, 9, 0, 0,19, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} FORCE FIELD TUNNEL",132,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 47 : Key Tunnel, Top Right + Room room = (Room) rooms.elementAt(47); + int[][] table = { + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 9, 9}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0,18, 9}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 9, 9}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 9, 9}, + {0, 0, 0,22, 0, 0, 0,22, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} FORCE FIELD TUNNEL",132,708, 560); + room.graphix.addElement(camGraphix); + items.addElement(new Disk(16*28,2*32,room,Color.green,3)); + } + {// Room 48 : Ventilation Shaft Left + Room room = (Room) rooms.elementAt(48); + int[][] table = { + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5}, + {5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5}, + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} VENTILATION SHAFT",126,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 49 : Ventilation Shaft Right + Room room = (Room) rooms.elementAt(49); + int[][] table = { + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} VENTILATION SHAFT",126,708, 560); + room.graphix.addElement(camGraphix); + String[] fanlist = { + "fan0.gif", + "fan1.gif", + "fan2.gif", + "fan3.gif", + "fan2.gif", + "fan1.gif"}; + room.graphix.addElement(new Graphix(fanlist,17*28,5*32)); + } + {// Room 50 : Ventilation Shaft Maze + Room room = (Room) rooms.elementAt(50); + int[][] table = { + {5,5,5,5,5,5,0,0,0,5,5,0,0,0,5,5,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,5,5,0,0,0,5,5,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,5,5,0,0,0,5,5,0,0,0,0}, + {5,0,0,0,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5}, + {0,0,0,0,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5}, + {0,0,0,0,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5}, + {5,5,5,5,5,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5}, + {5,5,5,5,5,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5}, + {5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5}, + {0,0,0,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,0,0}, + {5,5,5,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} VENTILATION SHAFT",126,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 51 : Ventilation Shaft Maze + Room room = (Room) rooms.elementAt(51); + int[][] table = { + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} VENTILATION SHAFT",126,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 52 : Ventilation Shaft Maze + Room room = (Room) rooms.elementAt(52); + int[][] table = { + {5,5,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {0,0,0,0,0,5,5,5,0,0,0,0,5,5,0,0,0,0,0,0}, + {0,0,0,0,0,5,5,5,0,0,0,0,0,5,0,0,0,0,0,0}, + {5,5,0,0,0,5,5,5,5,0,0,0,0,5,5,5,5,5,5,5}, + {5,5,0,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,0,0}, + {5,5,0,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,0,0}, + {5,5,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5}, + {5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5}, + {5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,5,5,5}, + {0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5}, + {5,5,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} VENTILATION SHAFT",126,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 53 : Map Room, Bottom Left + Room room = (Room) rooms.elementAt(53); + int[][] table = { + {6,0,0,0,0,0,0,0,6,6,6,6,6,6,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,6,6,6,6,6,6,0,0,0,0,0,0,0,6,0,0}, + {6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0}, + {6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0}, + {6,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,6,0,0}, + {6,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,6,0,0}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD MAP",104,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 54 : Map Room, Bottom Right + Room room = (Room) rooms.elementAt(54); + int[][] table = { + {6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,6,0,0,0,0,6,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,6,6,6,6,6,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,6}, + {0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,6,6,6,6,0,0,0,0,0,0,0,0,0,6,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} MINEFIELD MAP",104,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 55 : Energy Chamber, Upper + Room room = (Room) rooms.elementAt(55); + int[][] table5 = { + {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10} + }; + room.RoomArray = table5; + + room.AddTextBox("{BIG} {000,204,000} HIGH VOLTAGE ROOM",118,708, 560); + room.graphix.addElement(camGraphix); + items.addElement(new NotAButton(10*28, 6*32, room)); + items.addElement(new EnergyButton()); + } + {// Room 56 : Elevator, Left + Room room = (Room) rooms.elementAt(56); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} LOBBY",212,708, 560); + room.graphix.addElement(camGraphix); + } + {// Room 57 : Energy Chamber, Lower + Room room = (Room) rooms.elementAt(57); + int[][] table = { + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10,10}, + {10,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,10}, + {10,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10,10,10,10,10,10,10,10, 0, 0, 0, 0,10,10,10,10,10,10,10,10} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} SAFETY ROOM",131,708, 560); + room.graphix.addElement(camGraphix); + room.AddGraphix("FFleft.gif",30,4*32+3); + room.AddGraphix("FFright.gif",18*28-2,4*32+3); + room.AddTextBox("..........................................",28,4*32+16, 560); + } + {// Room 58 : Trash Dump + Room room = (Room) rooms.elementAt(58); + int[][] table = { + {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + {11,11,11,11,11,11,11,11, 0, 0, 0, 0,11,11,11,11,11,11,11,11} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} TRASH DUMP",145,708, 560); + room.graphix.addElement(camGraphix); + items.addElement(new SmallChip(3*28, 9*32, room, "7")); + } + {// Room 59 : Elevator, Right + Room room = (Room) rooms.elementAt(59); + int[][] table = { + { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0,27, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {15,15,15,15,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {000,204,000} ELEVATOR",172,708, 560); + room.AddTextBox("\"Hold, please!\"",84,54, 560); + room.AddTextBox("HOLD",480,350, 560); + room.graphix.addElement(camGraphix); + room.AddGraphix("hold.gif",18*28,10*32-4); + items.addElement(new SmallChip(3*28, 9*32, room, "8")); + } + + {// Room 60 : Purgatorium + Room room = (Room) rooms.elementAt(60); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}}; + room.RoomArray = table; + room.AddTextBox("{BIG} {255,000,000} PURGATORIUM",131,64,500); + room.AddTextBox("(Please wait for Trash Room)",112,11*32,500); + } + {// Room 61 : Secret Room + Room room = (Room) rooms.elementAt(61); + int[][] table = { + {5,5,5,5,5,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}}; + room.RoomArray = table; + room.AddTextBox("Hello again, organic dude!",2*28,4*32,500); + room.AddTextBox("To find secret #5, you must enter a Zen state of mind... To open a door is to close a door, and to close a door is to open a door.", + 2*28,6*32,500); + String[] helperlist = { + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper1.gif","helper4.gif","helper2.gif","helper3.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper5.gif","helper5.gif","helper5.gif","helper5.gif", + }; + Graphix helper = new Graphix(helperlist,15*28, 8*32); + room.graphix.addElement(helper); + items.addElement(new Key(16*28,3*32,room,new Color(255,128,0))); + } + + // Main area map + int[][] roomgrid = + { + { 5, 6, 7, 8, 9,10,11}, + {37,24,25,38,39,41,12}, + {35,26,27,21,53,54,13}, + {34,44,45,36,46,47,14}, + {33,42,43,55,23,22,15}, + {32,56,59,57,58,40,16}, + {31,30,29,28,19,18,17} + }; + LinkRoomsGrid(roomgrid); + + // Ventilation shaft map + // + // 20 52 + // | | + //(25)- 48 ----- 49 -(38) + // | | + // | (21)- 51 -(53) + // | | + // 20 - 50 ----- 52 - 20 + // | + // 20 + + int[] roomlist1 = {25,48,49,38}; + int[] roomlist2 = {21,51,53}; + int[] roomlist3 = {20,50,52,20}; + int[] roomlist4 = {20,48,50,20}; + int[] roomlist5 = {52,49,51,52}; + + LinkRoomsHorizontally(roomlist1); + LinkRoomsHorizontally(roomlist2); + LinkRoomsHorizontally(roomlist3); + LinkRoomsVertically(roomlist4); + LinkRoomsVertically(roomlist5); + + LinkRoomsUpDown(60,61); + + gameCursor = new GameCursor(6*28,8*32,(Room) rooms.elementAt(40)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} \ No newline at end of file diff --git a/src/com/droidquest/levels/RO5.java b/src/com/droidquest/levels/RO5.java new file mode 100644 index 0000000..374676b --- /dev/null +++ b/src/com/droidquest/levels/RO5.java @@ -0,0 +1,1169 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.decorations.Graphix; +import com.droidquest.items.BinaryKey; +import com.droidquest.items.HiddenCamera; +import com.droidquest.items.Key; +import com.droidquest.items.Sentry; +import com.droidquest.items.SkyGuard; +import com.droidquest.items.SkywayFlyer; +import com.droidquest.items.SonicLock; +import com.droidquest.materials.AutoRunner; +import com.droidquest.materials.BinaryLock; +import com.droidquest.materials.BlueGridSwitch; +import com.droidquest.materials.CameraDisable; +import com.droidquest.materials.CameraEnable; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.DeactivatorSwitch; +import com.droidquest.materials.HotWires; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.MultiButton; +import com.droidquest.materials.MultiSwitch; +import com.droidquest.materials.SkyGuardMat; +import com.droidquest.materials.Switch; + +class RO5 extends Level +{ +public RO5 (RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0 = Empty Space + materials.addElement(new Material(new Color(0,204,0),false, true)); // 1 = Green + materials.addElement(new Material(new Color(192,192,255),false, true)); // 2 = Light Blue + materials.addElement(new Material(new Color(63,32,0),false, true)); // 3 = Brown + materials.addElement(new Material(new Color(128,128,128),false, true)); // 4 = Grey + materials.addElement(new Material(new Color(255,128,0),false, true)); // 5 = Orange + materials.addElement(new Material(new Color(255,255,255),false, true)); // 6 = White + materials.addElement(new Material(new Color(0,0,255),false, true)); // 7 = Blue + materials.addElement(new Material(new Color(0,0,128),false,true)); // 8 = DarkBlue + materials.addElement(new Material(new Color(255,224,192),false, true)); // 9 = Tan Flesh +// materials.addElement(new Material(new Color(128,0,0),false, true)); // 10 = Black Wall + materials.addElement(new Material(Color.black,false, true)); // 10 = Black Wall + int[][] program1 = { + {Lock.NARROW}, + {15,4,0, 15,5,0, 15,6,0, 15,7,0, 16,4,2, 17,5,2, 17,6,2, 16,7,2}, + {16,4,0, 17,5,0, 17,6,0, 16,7,0, 16,3,2, 17,3,2, 16,8,2, 17,8,2}, + {Lock.NARROW}, + {16,4,2, 17,5,2, 17,6,2, 16,7,2, 16,3,0, 17,3,0, 16,8,0, 17,8,0}, + {15,4,2, 15,5,2, 15,6,2, 15,7,2, 16,4,0, 17,5,0, 17,6,0, 16,7,0} + }; + materials.addElement(new Lock(Color.blue, Color.blue, program1)); // 11= 1st lock + materials.addElement(new AutoRunner(AutoRunner.UP)); // 12= UP + materials.addElement(new AutoRunner(AutoRunner.RIGHTUP)); // 13= RIGHTUP + materials.addElement(new AutoRunner(AutoRunner.RIGHT)); // 14= RIGHT + materials.addElement(new AutoRunner(AutoRunner.RIGHTDOWN)); // 15= RIGHTDOWN + materials.addElement(new AutoRunner(AutoRunner.DOWN)); // 16= DOWN + materials.addElement(new AutoRunner(AutoRunner.LEFTDOWN)); // 17= LEFTDOWN + materials.addElement(new AutoRunner(AutoRunner.LEFT)); // 18= LEFT + materials.addElement(new AutoRunner(AutoRunner.LEFTUP)); // 19= LEFTUP + materials.addElement(new AutoRunner(AutoRunner.STOP)); // 20= STOP + int[][] program2 = { + {BinaryLock.NARROW}, + {2,10,0, 3,10,0, 4,10,0, 5,10,0, 2,9,2, 3,8,2, 4,8,2, 5,9,2}, + {2,9,0, 3,8,0, 4,8,0, 5,9,0, 1,9,2, 1,8,2, 6,9,2, 6,8,2}, + {BinaryLock.NARROW}, + {2,9,2, 3,8,2, 4,8,2, 5,9,2, 1,9,0, 1,8,0, 6,9,0, 6,8,0}, + {2,10,2, 3,10,2, 4,10,2, 5,10,2, 2,9,0, 3,8,0, 4,8,0, 5,9,0}, + }; + materials.addElement(new BinaryLock(Color.blue, program2)); // 21=Lock + materials.addElement(new HotWires(HotWires.LEFT+HotWires.RIGHT,true)); // 22=HotWire + materials.addElement(new HotWires(HotWires.LEFT+HotWires.DOWN,true)); // 23=HotWire + materials.addElement(new HotWires(HotWires.UP+HotWires.DOWN,true)); // 24=HotWire + materials.addElement(new DeactivatorSwitch()); // 25=Deactivator + materials.addElement(new CrystalRecharger()); // 26=Recharger + int[][] program3 = { + {BinaryLock.NARROW} + }; + materials.addElement(new BinaryLock(Color.white, program3)); // 27=BinaryLock2 + materials.addElement(new MultiSwitch(0,0)); // 28=Starter + materials.addElement(new MultiSwitch(1,0)); // 29=1 + materials.addElement(new MultiSwitch(2,0)); // 30=2 + materials.addElement(new MultiSwitch(3,0)); // 31=3 + materials.addElement(new MultiSwitch(4,0)); // 32=4 + materials.addElement(new HotWires(0,true)); // 33=BlueGrid + materials.addElement(new CameraEnable()); // 34=CameraEnable + materials.addElement(new CameraDisable()); // 35=Cam Disable + materials.addElement(new BlueGridSwitch()); // 36=BlueGridOff + int[][] program4 = { + {-12}, // {Switch.WAIT4PLAYERCONTACT}, +// {Switch.WAIT4CONTACT}, + {Switch.SETVALUEHIGH}, + {Switch.REPLACE, 2,11,0}, + {Switch.REPLACE, 3,11,0}, + {Switch.REPLACE, 4,11,0}, + {Switch.REPLACE, 5,11,0}, + {Switch.DOWNROOM}, + {Switch.REPLACE, 2,0,0, 3,0,0, 4,0,0, 5,0,0}, + {Switch.WAIT4REMOVAL}, + {Switch.REPLACE, 5,11,9}, + {Switch.REPLACE, 4,11,9}, + {Switch.REPLACE, 3,11,9}, + {Switch.REPLACE, 2,11,9}, + {Switch.DOWNROOM}, + {Switch.REPLACE, 2,0,9, 3,0,9, 4,0,9, 5,0,9}, + {Switch.SETVALUELOW} + }; + materials.addElement(new Switch(Switch.ROT_RIGHT, program4)); //37=Grid door Switch + int[][] program5 = { + {BinaryLock.NARROW}, + {6,2,2, 9,2,0, 10,2,0, 13,2,2}, + {5,2,2, 8,2,0, 11,2,0, 14,2,2}, + {BinaryLock.NARROW}, + {5,2,0, 8,2,2, 11,2,2, 14,2,0}, + {6,2,0, 9,2,2, 10,2,2, 13,2,0} + }; + materials.addElement(new BinaryLock(Color.blue,program5)); //38=Binary Lock + materials.addElement(new MultiButton(0,1)); // 39= MultiButton Starter + materials.addElement(new MultiButton(1,0)); // 40= Multibutton 1 + materials.addElement(new MultiButton(2,0)); // 41= Multibutton 2 + materials.addElement(new MultiButton(3,0)); // 42= Multibutton 3 + materials.addElement(new MultiButton(4,0)); // 43= Multibutton 4 + materials.addElement(new MultiButton(5,0)); // 44= Multibutton 5 + materials.addElement(new MultiButton(6,0)); // 45= Multibutton 6 + materials.addElement(new MultiButton(7,0)); // 46= Multibutton 7 + materials.addElement(new MultiButton(8,0)); // 47= Multibutton 8 + materials.addElement(new MultiButton(9,0)); // 48= Multibutton 9 + materials.addElement(new SkyGuardMat()); // 49= SkyGuard + + materials.addElement(new Material(new Color(192,192,255),true,true)); // 50=False wall + + for (int a=0; a<38; a++) + rooms.addElement(new Room()); + + String[] skyway0 = {"skyway00.gif","skyway01.gif","skyway02.gif"}; + String[] skyway1 = {"skyway03.gif","skyway04.gif"}; + String[] skyway2 = {"skyway05.gif","skyway06.gif","skyway07.gif","skyway08.gif"}; + String[] skyway3 = {"skyway09.gif","skyway10.gif","skyway11.gif"}; + String[] skyway4 = {"skyway12.gif","skyway13.gif"}; + String[] skyway5 = {"skyway14.gif","skyway15.gif"}; + String[] skyway6 = {"skyway16.gif","skyway17.gif"}; + String[] skyway7 = {"skyway18.gif","skyway19.gif","skyway20.gif"}; + String[] skyguard = {"skyguard0.gif","skyguard1.gif","skyguard2.gif","skyguard3.gif","skyguard4.gif"}; + + {// Room 0 Help + Room room = (Room) rooms.elementAt(0); + int[][] table0 = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table0; + + room.AddTextBox("Travel the Skyways to freedom!",80,64, 560); + room.AddTextBox("HINTS:", + 56,3*32, 560); + room.AddTextBox("Beware of Skyway traffic!", + 56,4*32, 560); + room.AddTextBox("Timing is critical for many locks.", + 56,5*32, 500); + room.AddTextBox("The Disk-O-Tek key is a sonic pattern. Read it from left to right. Repeat it once.", + 56,6*32, 500); + room.AddTextBox("Don't linger on the buttons.", + 56,8*32, 500); + room.AddTextBox("Arrows show the path through the blue grid. Your 'bot must ride it alone.", + 56,9*32, 500); + room.AddTextBox("(To continue, press RETURN.)", + 96,346, 500); + } + {// Room 1 Entrance: Locked Door + Room room = (Room) rooms.elementAt(1); + int[][] table1 = { + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11, 2, 0, 0, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,50, 2, 2, 2} + }; + room.RoomArray = table1; + + } + {// Room 2 Entrance Chamber + Room room = (Room) rooms.elementAt(2); + int[][] table2 = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2}, + {2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table2; + + } + {// Room 3 Skyway + Room room = (Room) rooms.elementAt(3); + int[][] table3 = { + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0} + }; + room.RoomArray = table3; + + room.AddTextBox("The Skyways of Robotropolis",118,86, 560); + items.addElement(new SkywayFlyer(5*28+2,2*32,room,skyway0,-4)); + items.addElement(new SkywayFlyer(5*28+2,5*32,room,skyway1,-4)); + items.addElement(new SkywayFlyer(5*28+2,8*32,room,skyway2,-4)); + items.addElement(new SkywayFlyer(8*28+2,2*32,room,skyway3,2)); + items.addElement(new SkywayFlyer(8*28+2,5*32,room,skyway4,2)); + items.addElement(new SkywayFlyer(8*28+2,8*32,room,skyway5,2)); + items.addElement(new SkywayFlyer(11*28+2,2*32,room,skyway6,-2)); + items.addElement(new SkywayFlyer(11*28+2,5*32,room,skyway7,-2)); + items.addElement(new SkywayFlyer(11*28+2,8*32,room,skyway0,-2)); + items.addElement(new SkywayFlyer(14*28+2,2*32,room,skyway1,4)); + items.addElement(new SkywayFlyer(14*28+2,5*32,room,skyway2,4)); + items.addElement(new SkywayFlyer(14*28+2,8*32,room,skyway3,4)); + items.addElement(new SkyGuard(4*28,0,room,4)); + items.addElement(new SkyGuard(10*28,11*32,room,4)); + } + {// Room 4 Skyway + Room room = (Room) rooms.elementAt(4); + int[][] table4 = { + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0} + }; + room.RoomArray = table4; + + items.addElement(new SkywayFlyer(5*28+2,2*32,room,skyway4,-4)); + items.addElement(new SkywayFlyer(5*28+2,5*32,room,skyway5,-4)); + items.addElement(new SkywayFlyer(5*28+2,8*32,room,skyway6,-4)); + items.addElement(new SkywayFlyer(8*28+2,2*32,room,skyway7,2)); + items.addElement(new SkywayFlyer(8*28+2,5*32,room,skyway0,2)); + items.addElement(new SkywayFlyer(8*28+2,8*32,room,skyway1,2)); + items.addElement(new SkywayFlyer(11*28+2,2*32,room,skyway2,-2)); + items.addElement(new SkywayFlyer(11*28+2,5*32,room,skyway3,-2)); + items.addElement(new SkywayFlyer(11*28+2,8*32,room,skyway4,-2)); + items.addElement(new SkywayFlyer(14*28+2,2*32,room,skyway5,4)); + items.addElement(new SkywayFlyer(14*28+2,5*32,room,skyway6,4)); + items.addElement(new SkywayFlyer(14*28+2,8*32,room,skyway7,4)); + items.addElement(new SkyGuard(4*28,0,room,4)); + items.addElement(new SkyGuard(10*28,11*32,room,4)); + } + {// Room 5 Skyway + Room room = (Room) rooms.elementAt(5); + int[][] table5 = { + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0} + }; + room.RoomArray = table5; + + room.AddTextBox("I left my nodes in Robotropolis.",160,98, 250); + items.addElement(new SkywayFlyer(5*28+2,2*32,room,skyway0,-4)); + items.addElement(new SkywayFlyer(5*28+2,5*32,room,skyway2,-4)); + items.addElement(new SkywayFlyer(5*28+2,8*32,room,skyway4,-4)); + items.addElement(new SkywayFlyer(8*28+2,2*32,room,skyway6,2)); + items.addElement(new SkywayFlyer(8*28+2,5*32,room,skyway1,2)); + items.addElement(new SkywayFlyer(8*28+2,8*32,room,skyway3,2)); + items.addElement(new SkywayFlyer(11*28+2,2*32,room,skyway5,-2)); + items.addElement(new SkywayFlyer(11*28+2,5*32,room,skyway7,-2)); + items.addElement(new SkywayFlyer(11*28+2,8*32,room,skyway0,-2)); + items.addElement(new SkywayFlyer(14*28+2,2*32,room,skyway3,4)); + items.addElement(new SkywayFlyer(14*28+2,5*32,room,skyway6,4)); + items.addElement(new SkywayFlyer(14*28+2,8*32,room,skyway1,4)); + items.addElement(new SkyGuard(4*28,0,room,4)); + items.addElement(new SkyGuard(10*28,11*32,room,4)); + } + {// Room 6 Skyway + Room room = (Room) rooms.elementAt(6); + int[][] table6 = { + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0} + }; + room.RoomArray = table6; + + items.addElement(new SkywayFlyer(5*28+2,2*32,room,skyway4,-4)); + items.addElement(new SkywayFlyer(5*28+2,5*32,room,skyway7,-4)); + items.addElement(new SkywayFlyer(5*28+2,8*32,room,skyway2,-4)); + items.addElement(new SkywayFlyer(8*28+2,2*32,room,skyway5,2)); + items.addElement(new SkywayFlyer(8*28+2,5*32,room,skyway0,2)); + items.addElement(new SkywayFlyer(8*28+2,8*32,room,skyway4,2)); + items.addElement(new SkywayFlyer(11*28+2,2*32,room,skyway1,-2)); + items.addElement(new SkywayFlyer(11*28+2,5*32,room,skyway5,-2)); + items.addElement(new SkywayFlyer(11*28+2,8*32,room,skyway2,-2)); + items.addElement(new SkywayFlyer(14*28+2,2*32,room,skyway6,4)); + items.addElement(new SkywayFlyer(14*28+2,5*32,room,skyway3,4)); + items.addElement(new SkywayFlyer(14*28+2,8*32,room,skyway7,4)); + items.addElement(new SkyGuard(4*28,0,room,4)); + items.addElement(new SkyGuard(10*28,11*32,room,4)); + } + {// Room 7 Skyway + Room room = (Room) rooms.elementAt(7); + int[][] table7 = { + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0} + }; + room.RoomArray = table7; + + room.AddTextBox("I'll have a ramburger and chips to go.",160,96, 300); + items.addElement(new SkywayFlyer(5*28+2,2*32,room,skyway0,-4)); + items.addElement(new SkywayFlyer(5*28+2,5*32,room,skyway5,-4)); + items.addElement(new SkywayFlyer(5*28+2,8*32,room,skyway2,-4)); + items.addElement(new SkywayFlyer(8*28+2,2*32,room,skyway7,2)); + items.addElement(new SkywayFlyer(8*28+2,5*32,room,skyway4,2)); + items.addElement(new SkywayFlyer(8*28+2,8*32,room,skyway1,2)); + items.addElement(new SkywayFlyer(11*28+2,2*32,room,skyway6,-2)); + items.addElement(new SkywayFlyer(11*28+2,5*32,room,skyway3,-2)); + items.addElement(new SkywayFlyer(11*28+2,8*32,room,skyway0,-2)); + items.addElement(new SkywayFlyer(14*28+2,2*32,room,skyway6,4)); + items.addElement(new SkywayFlyer(14*28+2,5*32,room,skyway4,4)); + items.addElement(new SkywayFlyer(14*28+2,8*32,room,skyway2,4)); + items.addElement(new SkyGuard(4*28,0,room,4)); + items.addElement(new SkyGuard(10*28,11*32,room,4)); + } + {// Room 8 Skyway + Room room = (Room) rooms.elementAt(8); + int[][] table8 = { + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4}, + {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0}, + {0, 0, 0, 4,49,49,49,49,49,49,49,49,49,49,49,49, 4, 0, 0, 0} + }; + room.RoomArray = table8; + + items.addElement(new SkywayFlyer(5*28+2,2*32,room,skyway7,-4)); + items.addElement(new SkywayFlyer(5*28+2,5*32,room,skyway5,-4)); + items.addElement(new SkywayFlyer(5*28+2,8*32,room,skyway3,-4)); + items.addElement(new SkywayFlyer(8*28+2,2*32,room,skyway1,2)); + items.addElement(new SkywayFlyer(8*28+2,5*32,room,skyway0,2)); + items.addElement(new SkywayFlyer(8*28+2,8*32,room,skyway7,2)); + items.addElement(new SkywayFlyer(11*28+2,2*32,room,skyway6,-2)); + items.addElement(new SkywayFlyer(11*28+2,5*32,room,skyway5,-2)); + items.addElement(new SkywayFlyer(11*28+2,8*32,room,skyway4,-2)); + items.addElement(new SkywayFlyer(14*28+2,2*32,room,skyway3,4)); + items.addElement(new SkywayFlyer(14*28+2,5*32,room,skyway2,4)); + items.addElement(new SkywayFlyer(14*28+2,8*32,room,skyway1,4)); + items.addElement(new SkyGuard(4*28,0,room,4)); + items.addElement(new SkyGuard(10*28,11*32,room,4)); + } + {// Room 9 Pinto Puzzle + Room room = (Room) rooms.elementAt(9); + int[][] table9 = { + {4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0,29, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0,31, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0,30, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0,32, 4, 4}, + {4, 4, 4, 4, 4, 4, 4,27, 0, 0, 0,28, 4, 4, 4, 4, 4, 4, 4, 4}, + {4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4} + }; + room.RoomArray = table9; + + room.AddTextBox("{BIG} {255,255,255} 1",506,94, 560); + room.AddTextBox("{BIG} {255,255,255} 2",506,158, 560); + room.AddTextBox("{BIG} {255,255,255} 3",506,222, 560); + room.AddTextBox("{BIG} {255,255,255} 4",506,286, 560); + room.AddTextBox("Based on the 1973 Ford Pinto... What an engine-ous lock!", + 44,64, 350); + room.AddTextBox("STARTER",252,288, 560); + room.AddArrow(11*28+14,10*32,Arrow.DIR_DOWN, 32, Color.white); + room.AddGraphix("whiteVertical.gif",14*28,2*32); + int[] pace = {14*28,3*32, 14*28,9*32}; + int[] protect = {14*28,2*32,19*28,10*32, 10*28,0}; + items.addElement(new Sentry(14*28,3*32,room,pace,protect, false)); + } + {// Room 10 First Sentry, Upper + Room room = (Room) rooms.elementAt(10); + int[][] table10 = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,8,8,0,0,8,0,0,0,0,8,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,8}, + {0,0,0,0,8,8,0,0,0,8,0,0,0,8,8,8,0,0,0,8}, + {8,8,8,8,8,0,0,0,0,8,0,0,0,8,8,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,8,0,0,0,8,8,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,8,0,0,0,8,8,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,8,0,0,0,0,8,8,8,0,0,0,0}, + {8,0,0,0,8,8,8,8,8,0,0,0,0,8,8,8,0,0,0,0}, + {8,0,0,0,8,8,8,8,8,0,0,0,0,8,8,8,8,8,8,8}, + {8,0,0,0,8,8,8,8,8,0,0,0,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table10; + + int[] pace = {11*28,3*32, 11*28,10*32}; + int[] program={4*28,0,13*28,11*32,0,3*32, 13*28,0,18*28,11*32,19*28,8*32}; + items.addElement(new Sentry(11*28,3*32,room,pace,program,false)); + } + {// Room 11 Sound Lock + Room room = (Room) rooms.elementAt(11); + int[][] table11 = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,8,0,0,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,8,0,0,8,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,8,0,0,8,0,0,0,0}, + {8,0,0,0,0,0,0,0,0,0,0,0,8,0,0,8,0,0,0,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table11; + + room.AddTextBox("This lock is wired for sound. ",76,80, 240); + room.AddTextBox("Beep in time to the flashing receiver.",76,304, 240); + int[][] program = { + {SonicLock.BINARY, 1,0,0,1,1,0,1,0,0,1,1,0}, + {SonicLock.MODIFY, 15,4,0, 15,5,0, 15,6,0, 15,7,0, 16,4,8, 17,5,8, 17,6,8, 16,7,8}, + {SonicLock.MODIFY, 16,4,0, 17,5,0, 17,6,0, 16,7,0, 16,3,8, 17,3,8, 16,8,8, 17,8,8}, + {SonicLock.BINARY, 1,0,0,1,1,0,1,0,0,1,1,0}, + {SonicLock.MODIFY, 16,4,8, 17,5,8, 17,6,8, 16,7,8, 16,3,0, 17,3,0, 16,8,0, 17,8,0}, + {SonicLock.MODIFY, 15,4,8, 15,5,8, 15,6,8, 15,7,8, 16,4,0, 17,5,0, 17,6,0, 16,7,0} + }; + items.addElement(new SonicLock(18*28, 5*32+15, room, program)); + } + {// Room 12 Path after Disk Drive + Room room = (Room) rooms.elementAt(12); + int[][] table12 = { + {8,8,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table12; + + } + {// Room 13 Chamber before Hot Wires + Room room = (Room) rooms.elementAt(13); + int[][] table13 = { + {9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9}, + {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9}, + {9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,9} + }; + room.RoomArray = table13; + + } + {// Room 14 Dark Maze + Room room = (Room) rooms.elementAt(14); + int[][] table14 = { + {10, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10,10,10,10,10, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + { 0, 0, 0, 0,10, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + { 0, 0, 0, 0,10, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0,10,10,10,10,10,10,10,10,10,10,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10} + }; + room.RoomArray = table14; + + room.AddTextBox("?",274,6*32+6,100); + room.AddArrow(280,112,Arrow.DIR_UP, 30, Color.white); + room.AddArrow(280,272,Arrow.DIR_DOWN, 30, Color.white); + room.AddArrow(200,192,Arrow.DIR_LEFT, 30, Color.white); + room.AddArrow(360,192,Arrow.DIR_RIGHT, 30, Color.white); + } + {// Room 15 First Sentry, Lower + Room room = (Room) rooms.elementAt(15); + int[][] table15 = { + {8,0,0,0,8,8,8,8,8,0,0,0,8,8,8,8,8,8,8,8}, + {8,0,0,0,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,8,8,8,8,8,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table15; + + } + {// Room 16 Rest Stop + Room room = (Room) rooms.elementAt(16); + int[][] table16 = { + {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,26, 0, 8}, + {8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8} + }; + room.RoomArray = table16; + + room.AddTextBox("SKYWAY REST STOP",184,2*28, 500); + room.AddTextBox("Next Rest Stop 50 Klicks.",130,4*28, 500); + } + {// Room 17 Timer Sentry Button + Room room = (Room) rooms.elementAt(17); + int[][] table17 = { + {3, 3, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3}, + {0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3,25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, + {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3} + }; + room.RoomArray = table17; + + room.AddTextBox("00",32,344, 560); + room.AddTextBox("Deactivate Guard Switch",140,246, 560); + room.AddTextBox("Timer",140,344, 560); + room.AddArrow(3*28,7*32+16,Arrow.DIR_LEFT,28,Color.white); + room.AddArrow(3*28,10*32+16,Arrow.DIR_LEFT,28,Color.white); + } + {// Room 18 Hot Wire Room + Room room = (Room) rooms.elementAt(18); + int[][] table18 = { + {5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, + {5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5}, + {5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5}, + {5,22,22,22,22,22,22,22,22,22,22,22,22,23, 0, 0, 0, 0, 0, 5}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 5}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 5}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 5}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 5}, + {5,22,22,22,22,22,22,22,23, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 5}, + {5, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 5}, + {5, 5, 5, 5, 0, 0, 0, 0,24, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 5}, + {5, 5, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5} + }; + room.RoomArray = table18; + + room.AddTextBox("Hot wires burn batteries...",80,60, 560); + int[] pace = {2*28,5*32, 11*28,5*32}; + int[] program = {4*28,0,12*28,11*32,0,5*32}; + items.addElement(new Sentry(2*28,5*32,room,pace,program,true)); + } + {// Room 19 Chamber before Disk Drive + Room room = (Room) rooms.elementAt(19); + int[][] table19 = { + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2,21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table19; + + room.AddTextBox("To Robotropolis Disk-O-Tek",316,182,325); + room.AddArrow(18*28,6*32+8,Arrow.DIR_RIGHT,2*28,Color.white); + } + {// Room 20 Path after Disk Drive + Room room = (Room) rooms.elementAt(20); + int[][] table20 = { + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}, + {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8} + }; + room.RoomArray = table20; + + } + {// Room 21 Dark Maze + Room room = (Room) rooms.elementAt(21); + int[][] table21 = { + {10, 0, 0, 0, 0,10,10,10,10,10,10, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0,10,10, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0,10,10, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0,10,10, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10}, + {10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0, 0}, + {10, 0, 0, 0, 0,10,10,10,10,10, 0, 0, 0, 0,10,10, 0, 0, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, 0, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, 0, 0,10} + }; + room.RoomArray = table21; + + room.AddTextBox("?",274,6*32+6,100); + room.AddArrow(280,112,Arrow.DIR_UP, 30, Color.white); + room.AddArrow(280,272,Arrow.DIR_DOWN, 30, Color.white); + room.AddArrow(200,192,Arrow.DIR_LEFT, 30, Color.white); + room.AddArrow(360,192,Arrow.DIR_RIGHT, 30, Color.white); + } + {// Room 22 Dark Maze + Room room = (Room) rooms.elementAt(22); + int[][] table22 = { + {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {10, 0, 0, 0, 0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {10,10,10,10,10,10,10, 0, 0, 0,10, 0, 0, 0,10,10,10,10,10,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0,10,10, 0, 0, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0,10,10, 0, 0, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0,10,10, 0, 0, 0, 0}, + {10, 0, 0, 0, 0,10,10,10,10,10,10, 0, 0, 0,10,10, 0, 0, 0,10} + }; + room.RoomArray = table22; + + room.AddTextBox("?",274,6*32+6,100); + room.AddArrow(280,112,Arrow.DIR_UP, 30, Color.white); + room.AddArrow(280,272,Arrow.DIR_DOWN, 30, Color.white); + room.AddArrow(200,192,Arrow.DIR_LEFT, 30, Color.white); + room.AddArrow(360,192,Arrow.DIR_RIGHT, 30, Color.white); + } + {// Room 23 Dark Maze + Room room = (Room) rooms.elementAt(23); + int[][] table23 = { + {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 0, 0, 0, 0,10}, + { 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10}, + {10,10, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10, 0, 0, 0, 0,10}, + { 0, 0,10,10, 0, 0, 0, 0, 0,10,10, 0, 0, 0,10, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10}, + {10,10,10,10,10,10,10,10,10, 0,10,10,10,10,10,10,10,10, 0,10} + }; + room.RoomArray = table23; + + room.AddTextBox("?",274,6*32+6,100); + room.AddArrow(280,112,Arrow.DIR_UP, 30, Color.white); + room.AddArrow(280,272,Arrow.DIR_DOWN, 30, Color.white); + room.AddArrow(200,192,Arrow.DIR_LEFT, 30, Color.white); + room.AddArrow(360,192,Arrow.DIR_RIGHT, 30, Color.white); + } + {// Room 24 Dark Maze + Room room = (Room) rooms.elementAt(24); + int[][] table24 = { + {10,10,10,10,10,10,10,10,10, 0,10,10,10,10,10,10,10,10, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0,10, 0,10, 0, 0, 0, 0, 0, 0, 0, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0,10, 0,10,10,10,10, 0,10,10,10,10,10}, + {10, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10, 0,10, 0, 0, 0, 0}, + {10, 0, 0, 0,10,10,10,10,10, 0,10,10, 0,10, 0,10, 0,10, 0, 0}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0,10, 0,10, 0,10, 0,10}, + {10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0,10, 0,10, 0,10, 0,10}, + {10,10,10,10,10,10,10, 0, 0, 0, 0,10, 0,10, 0,10, 0,10, 0,10}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0,10, 0, 0, 0,10, 0,10}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0,10,10,10,10,10, 0,10}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0,10}, + {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10} + }; + room.RoomArray = table24; + + room.AddTextBox("?",274,6*32+6,100); + room.AddArrow(280,112,Arrow.DIR_UP, 30, Color.white); + room.AddArrow(280,272,Arrow.DIR_DOWN, 30, Color.white); + room.AddArrow(200,192,Arrow.DIR_LEFT, 30, Color.white); + room.AddArrow(360,192,Arrow.DIR_RIGHT, 30, Color.white); + } + {// Room 25 Grid Puzzle + Room room = (Room) rooms.elementAt(25); + int[][] table25 = { + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,33,33,33,33, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,33,33,33,33, 9, 9}, + {9, 9,33,33,33,33,33,33,33,33, 0, 0, 0, 0,33,33,33,33, 9, 9}, + {9, 9,33,33,33,33,33,33,33,33, 0, 0, 0, 0,33,33,33,33, 9, 9}, + {9, 9,33,33,33,33, 0, 0, 0, 0, 0, 0, 0, 0,33,33,33,33, 9, 9}, + {9, 9,33,33,33,33, 0, 0, 0, 0, 0, 0, 0, 0,33,33,33,33, 9, 9}, + {9, 9,33,33,33,33, 0, 0, 0, 0,33,33,33,33,33,33,33,33, 9, 9}, + {9, 9,33,33,33,33, 0, 0, 0, 0,33,33,33,33,33,33,33,33, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,36, 9, 9}, + {9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9} + }; + room.RoomArray = table25; + + items.addElement(new HiddenCamera(room)); + room.AddTextBox("00",28,350,100); + room.AddTextBox("Timer",4*28,350,100); + room.AddArrow(3*28,10*32+16,Arrow.DIR_LEFT,28,Color.white); + room.AddTextBox("Blue Grid Switch",9*28,350, 560); + room.AddArrow(17*28,10*32+16,Arrow.DIR_RIGHT,28,Color.white); + room.AddGraphix("blueHorizontal.gif",2*28+2,1*32+2); + room.AddGraphix("blueHorizontal.gif",2*28+2,3*32); + room.AddGraphix("blueHorizontal.gif",2*28+2,5*32); + room.AddGraphix("blueHorizontal.gif",2*28+2,7*32); + room.AddGraphix("blueHorizontal.gif",2*28+2,9*32); + room.AddGraphix("blueVertical.gif",2*28+2,34); + room.AddGraphix("blueVertical.gif",6*28,34); + room.AddGraphix("blueVertical.gif",10*28,34); + room.AddGraphix("blueVertical.gif",14*28,34); + room.AddGraphix("blueVertical.gif",18*28-6,34); + } + {// Room 26 Grid puzzle map + Room room = (Room) rooms.elementAt(26); + int[][] table26 = { + {9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9,35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9}, + {9, 9,34,35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,37, 9, 9}, + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9} + }; + room.RoomArray = table26; + + room.AddArrow( 4*28+22,2*32,Arrow.DIR_RIGHT,32,Color.white); + room.AddArrow( 8*28+22,2*32,Arrow.DIR_RIGHT,32,Color.white); + room.AddArrow(12*28+22,2*32,Arrow.DIR_RIGHT,32,Color.white); + room.AddTextBox("{BIG} {255,128,000} X",15*28+14, 1*32, 50); + room.AddTextBox("{BIG} {255,128,000} X", 3*28+14, 3*32, 50); + room.AddTextBox("{BIG} {255,128,000} X", 7*28+14, 3*32, 50); + room.AddArrow(12*28,5*32-18,Arrow.DIR_DOWN,32,Color.white); + room.AddTextBox("{BIG} {255,128,000} X",15*28+14, 3*32, 50); + room.AddTextBox("{BIG} {255,128,000} X", 3*28+14, 5*32, 50); + room.AddArrow( 8*28-18,6*32,Arrow.DIR_LEFT,32,Color.white); + room.AddArrow(12*28-18,6*32,Arrow.DIR_LEFT,32,Color.white); + room.AddTextBox("{BIG} {255,128,000} X",15*28+14, 5*32, 50); + room.AddTextBox("{BIG} {255,128,000} X", 3*28+14, 7*32, 50); + room.AddArrow( 8*28,9*32-18,Arrow.DIR_DOWN,32,Color.white); + room.AddTextBox("{BIG} {255,128,000} X",11*28+14, 7*32, 50); + room.AddTextBox("{BIG} {255,128,000} X",15*28+14, 7*32, 50); + + room.AddTextBox("Open Door",380,338, 560); + room.AddTextBox("View room below",104,320, 120); + room.AddArrow(104,10*32+16,Arrow.DIR_LEFT,28,Color.white); + room.AddGraphix("whiteHorizontal.gif",2*28+2,1*32+2); + room.AddGraphix("whiteHorizontal.gif",2*28+2,3*32); + room.AddGraphix("whiteHorizontal.gif",2*28+2,5*32); + room.AddGraphix("whiteHorizontal.gif",2*28+2,7*32); + room.AddGraphix("whiteHorizontal.gif",2*28+2,9*32); + room.AddGraphix("whiteVertical.gif",2*28+2,34); + room.AddGraphix("whiteVertical.gif",6*28,34); + room.AddGraphix("whiteVertical.gif",10*28,34); + room.AddGraphix("whiteVertical.gif",14*28,34); + room.AddGraphix("whiteVertical.gif",18*28-6,34); + + } + {// Room 27 Final Puzzle + Room room = (Room) rooms.elementAt(27); + int[][] table27 = { + {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 2,38, 0, 0,39, 2, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2}, + {2, 2,42, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,43, 2, 2}, + {2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2}, + {2, 2,40, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,41, 2, 2}, + {2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2}, + {2, 2,44, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0,45, 2, 2}, + {2, 0, 0, 0, 0,46, 0, 2, 0, 0, 0, 0, 2, 0,47, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 2, 0, 2,48, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table27; + + room.AddTextBox("{BIG} {000,000,255} 3",28,94, 560); + room.AddTextBox("STARTER",412,52, 560); + room.AddArrow(13*28,32+16,Arrow.DIR_LEFT,28,Color.white); + room.AddTextBox("{BIG} {255,000,255} 2",504,158, 560); + room.AddTextBox("{BIG} {000,000,255} 1",28,158, 560); + room.AddTextBox("{BIG} {255,000,255} 4",504,94, 560); + room.AddTextBox("{BIG} {000,204,000} 5",28,318, 560); + room.AddTextBox("{BIG} {255,128,000} 6",504,318, 560); + room.AddTextBox("{BIG} {000,204,000} 7",112,350, 560); + room.AddTextBox("{BIG} {255,128,000} 8",420,350, 560); + room.AddTextBox("TRANSPORTER",216,134, 560); + room.AddTextBox("Press buttons in order.",196,166,170); + room.AddTextBox("Press last.",228,270,100); + room.AddArrow(8*28+14,10*32,Arrow.DIR_DOWN,32,Color.white); + } + {// Room 28 Disk Drive Entrance + Room room = (Room) rooms.elementAt(28); + int[][] table28 = { + {0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 8, 0, 8, 0, 8, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}, + {0, 8, 0, 8, 0, 8, 0, 8,14,14,14,14,14,14,14,14,14,14,14,14}, + {0, 8, 8, 8, 8, 8, 0, 8,14,14,14,14,14,14,14,14,14,14,14,14}, + {8, 8, 8, 8, 8, 8, 8, 8,12,12,12, 8, 8, 8, 8, 8, 8, 8, 8, 8}, + {0, 0, 0, 0, 0, 0, 0,20,12,12,12, 8, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0,20,12,12,12, 8, 0, 0, 0, 0, 0, 0, 0, 0}, + {8, 8, 8, 8, 8, 8, 8, 8,12,12,12, 8, 8, 8, 8, 8, 8, 8, 8, 8}, + {0, 8, 8, 8, 0, 0, 0, 8,12,12,18,18,18,18,18,18,18,18,18,18}, + {0, 8, 0, 0, 8, 0, 0, 8,12,18,18,18,18,18,18,18,18,18,18,18}, + {0, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}, + {0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} + }; + room.RoomArray = table28; + + room.AddTextBox("{BIG} {255,255,255} Robart ",320,208, 560); + } + {// Room 29 Disk Drive Path + Room room = (Room) rooms.elementAt(29); + int[][] table29 = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,12,12,12, 8, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,12,12,12, 8, 0, 0, 0}, + {14,14,14,14,14,14,14,14,14,14,14,14,14,12,12,12, 8, 0, 0, 0}, + {14,14,14,14,14,14,14,14,14,14,14,14,14,12,12,12, 8, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0}, + {18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, 8, 0, 0, 0}, + {18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, 8, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,12,12,12, 8, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,12,12,12, 8, 0, 0, 0} + }; + room.RoomArray = table29; + + room.AddTextBox("{BIG} {255,255,255} RO400 Disk Drive",12,208, 560); + } + {// Room 30 Disk Drive Top Left + Room room = (Room) rooms.elementAt(30); + int[][] table30 = { + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0,18,18}, + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0,18,18,18,18,18,18,18,18}, + { 7, 7, 7, 7, 7, 7, 7, 7,16,18,18,18,18,18,18,18,18,18,18,18}, + { 7, 7, 7, 7, 7, 7,16,18,18,18,18,18,18,18,18,18,17,17,18,18}, + { 7, 7, 7, 7, 7,16,18,18,18,18,18,18,18,18,18,17,17,17,18,18}, + { 7, 7, 7, 7,16,18,18,18,18,18,18,18,18,16,17,17,17,17,18,18}, + { 7, 7, 7,16,18,18,18,18,18,18,18,18,17,17,17,17,17,17,18,18}, + { 7, 7, 7,16,18,18,18,18,18,18,18,17,16,17,17,17,17,18,18,18}, + {18,18,18,18,18,18,18,18,18,18,17,16,16,16,16,17,16,18,18, 7}, + {18,18,18,18,18,18,18, 7, 7, 0,16,16,16,16,16,16,18, 7, 7, 7}, + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,16,16,16,16,16,16, 7, 7, 7, 7} + }; + room.RoomArray = table30; + + room.AddTextBox("On a clear disk you can seek forever...",200,188, 300); + } + {// Room 31 Disk Drive Top Right + Room room = (Room) rooms.elementAt(31); + int[][] table31 = { + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {18,18,18, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {18,18,18,18,18,18,18,18,18, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {18,18,18,18,18,18,18,18,18,18,18,18, 7, 7, 7, 7, 7, 7, 7, 7}, + {18,18,18,18,18,18,18,18,18,18,18,18,18,18, 7, 7, 7, 7, 7, 7}, + {18,18,18,18,18,18,18,19,18,18,12,12,12,12,18, 7, 7, 7, 7, 7}, + {18,18,18,18,18,18,19,19,19,19,12,12,12,12,12,18, 7, 7, 7, 7}, + {18,18,18,18,18,19,19,19,19,19,19,12,12,12,12,12,18, 7, 7, 7}, + {18,18,18,18,19,19,19,19,19,19,19,19,12,12,12,12,12, 7, 7, 7}, + { 7,12,18,19,19,19,19,19,19,19,19,19,19,12,12,12,12,18, 7, 7}, + { 7, 7, 7,19,12,12,12,12,19,19,19,19,19,19,12,12,12,12,18, 7}, + { 7, 7, 7, 7,12,12,12,12,19,19,19,19,19,19,19,12,12,12,12, 7} + }; + room.RoomArray = table31; + + } + {// Room 32 Disk Drive Bottom Right + Room room = (Room) rooms.elementAt(32); + int[][] table32 = { + { 7, 7, 7, 7,12,13,12,12,12,12,12,12,12,12,12,12,12,12,12, 7}, + { 7, 7, 7,14,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12, 7}, + { 7,14,14,13,13,13,13,13,13,13,13,13,13,13,12,12,12,12, 7, 7}, + {14,14,14,14,14,14,13,13,13,13,13,13,13,13,13,12,12, 7, 7, 7}, + {14,14,14,14,14,14,14,13,13,13,13,13,13,13,13,12,12, 7, 7, 7}, + {14,14,14,14,14,14,14,14,13,13,13,13,13,13,12,12, 7, 7, 7, 7}, + {14,14,14,14,14,14,14,14,14,13,13,13,13,12,12, 7, 7, 7, 7, 7}, + {14,14,14,14,14,14,14,14,14,14,13,12,12,12, 7, 7, 7, 7, 7, 7}, + {14,14,14,14,14,14,14,14,14,14,14,12, 7, 7, 7, 7, 7, 7, 7, 7}, + {14,14,14,14,14,14,14,14,12, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + {14,14,12, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table32; + + } + {// Room 33 Disk Drive Bottom Left + Room room = (Room) rooms.elementAt(33); + int[][] table33 = { + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,16,16,16,16,16,16, 7, 7, 7, 7}, + {14,14,14,15,15,15,16, 7, 7,16,16,16,16,16,16,16, 0, 7, 7, 7}, + {14,14,14,14,15,15,14,14,14,16,16,16,16,16,16,16, 0, 0, 0, 7}, + { 7, 7, 7,14,14,15,15,14,14,14,15,15,15,15,15,14,14,14,14,14}, + { 7, 7, 7,14,14,14,15,15,15,15,14,15,15,15,14,14,14,14,14,14}, + { 7, 7, 7, 7,14,14,14,14,14,14,14,15,15,15,14,14,14,14,14,14}, + { 7, 7, 7, 7, 7,14,14,14,14,14,14,14,15,15,14,14,14,14,14,14}, + { 7, 7, 7, 7, 7, 7,14,14,14,14,14,14,14,15,14,14,14,14,14,14}, + { 7, 7, 7, 7, 7, 7, 7, 7,14,14,14,14,14,14,14,14,14,14,14,14}, + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,14,14,14,14,14,14,14,14,14}, + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,14,14,14}, + { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} + }; + room.RoomArray = table33; + + room.AddTextBox("Welcome to", 284,222, 250); + room.AddTextBox("The Robotropolis", 248,242, 250); + room.AddTextBox("Disk-O-Tek", 316,262, 250); + items.addElement(new BinaryKey(9*28,1*32,room)); + String[] disco1 = {"disco0.gif","disco1.gif"}; + String[] disco2 = {"disco2.gif","disco3.gif"}; + String[] disco3 = {"disco4.gif","disco5.gif"}; + room.AddGraphix(disco1,9*28,8*32); + room.AddGraphix(disco2,12*28,7*32); + room.AddGraphix(disco3,16*28,9*32); + } + {// Room 34 Disk Drive Path + Room room = (Room) rooms.elementAt(34); + int[][] table34 = { + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,12,12,12, 9, 9, 9, 9}, + {9,14,14,14,14,14,14,14,14,14,14,14,14,12,12,12, 9, 0, 0, 0}, + {9,12,14,14,14,14,14,14,14,14,14,14,14,14,12,12, 9, 0, 0, 0}, + {9,12,12,12, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0}, + {9,12,12,12, 9, 0, 0, 9, 9, 9, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0}, + {9,12,12,12, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 0}, + {9,12,12,12, 9, 0, 0, 9, 9, 9, 0, 0, 0, 9, 0, 0, 9, 0, 0, 0}, + {9,12,12,12, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 9, 9, 0, 0, 0, 0}, + {9,12,12,12, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, + {9,12,12,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18}, + {9,12,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18}, + {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9} + }; + room.RoomArray = table34; + + } + {// Room 35 Disk Drive Path + Room room = (Room) rooms.elementAt(35); + int[][] table35 = { + {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + {3,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14}, + {3,12,12,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14}, + {3,12,12,12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + {3,12,12,12, 3, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 3, 0, 0, 0}, + {3,12,12,12, 3, 0, 0, 3, 0, 3, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0}, + {3,12,12,12, 3, 0, 0, 3, 0, 3, 0, 3, 0, 0, 3, 3, 3, 3, 0, 0}, + {3,12,12,12, 3, 0, 0, 3, 3, 3, 3, 3, 0, 0, 3, 0, 0, 3, 0, 0}, + {3,12,12,12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0}, + {3,12,12,18,18,18,18,18,18,18,18,18,18,18,18,18, 3, 0, 0, 0}, + {3,12,18,18,18,18,18,18,18,18,18,18,18,18,12,12, 3, 0, 0, 0}, + {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,12,12,12, 3, 3, 3, 3} + }; + room.RoomArray = table35; + + } + {// Room 36 Chamber after Grid Puzzle + Room room = (Room) rooms.elementAt(36); + int[][] table36 = { + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table36; + + } + + {// Room 37 Secret Room + Room room = (Room) rooms.elementAt(37); + room.SetMaterialOutline(0,0,19,11,2); + room.SetMaterial(16,0,0); + room.AddTextBox("All right! You've found the fifth secret.",2*28,4*32,500); + room.AddTextBox("To find the Secret 6th Level, look for a hidden path to the right when you're declared a Robot Master.", + 2*28,6*32,500); + String[] helperlist = { + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper1.gif","helper4.gif","helper2.gif","helper3.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper5.gif","helper5.gif","helper5.gif","helper5.gif", + }; + Graphix helper = new Graphix(helperlist,15*28, 8*32); + room.graphix.addElement(helper); + items.addElement(new Key(16*28,3*32,room,new Color(255,0,255))); + } + + int[] skyways = {8,7,6,5,4,3,1}; + LinkRoomsVertically(skyways); + + int[] roomlist1 = {1,2,3,10,4,19,28,29}; + LinkRoomsHorizontally(roomlist1); + LinkRoomsUpDown(10,15); + LinkRoomsUpDown(1,37); + + LinkRoomsUpDown(19,12); + int[] roomlist2 = {12,20,5,11,6,13,18}; + LinkRoomsHorizontally(roomlist2); + + int[][] roomgrid1 = { + {34,30,31}, + {35,33,32}}; + LinkRoomsGrid(roomgrid1); + LinkRoomsUpDown(35,29); + LinkRoomsUpDown(29,34); + + LinkRoomsUpDown(18,17); + + int[] roomlist3 = {22,23,8,16,17,7,14}; + LinkRoomsHorizontally(roomlist3); + + LinkRoomsLeftRight(21,24); + LinkRoomsUpDown(22,21); + LinkRoomsUpDown(21,14); + LinkRoomsUpDown(23,24); + + ((Room) rooms.elementAt(24)).rightRoom = (Room) rooms.elementAt(14); // 1-way connection + + int[] roomlist4 = {13,16,9,26,25,36,27}; + LinkRoomsVertically(roomlist4); + + gameCursor = new GameCursor(6*28,8*32,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/RO6.java b/src/com/droidquest/levels/RO6.java new file mode 100644 index 0000000..a1dc7be --- /dev/null +++ b/src/com/droidquest/levels/RO6.java @@ -0,0 +1,761 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.decorations.Graphix; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.items.Ghost; +import com.droidquest.items.Pellet; +import com.droidquest.items.Sentry; +import com.droidquest.items.Turbine; +import com.droidquest.items.WallHandle; +import com.droidquest.items.Wave; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.HotWires; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.PlayerBlocker; +import com.droidquest.materials.Portal; +import com.droidquest.materials.Switch; + +class RO6 extends Level +{ +public RO6 (RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0 = Empty Space + materials.addElement(new Material(Color.blue, false, true)); // 1 = Blue + materials.addElement(new Material(Color.white, false, true)); // 2 = White + materials.addElement(new Material(Color.red, false, true)); // 3 = Red + materials.addElement(new Material(new Color(255,128,0), false, true)); // 4 = Orange + materials.addElement(new Material(Color.yellow, false, true)); // 5 = Yellow + materials.addElement(new Material(Color.green, false, true)); // 6 = Green + materials.addElement(new Material(new Color(255,0,255), false, true)); // 7 = Purple + + materials.addElement(new HotWires( HotWires.UP + + HotWires.DOWN + + HotWires.LEFT + + HotWires.RIGHT, + true)); // 8=HotWire cross + materials.addElement(new HotWires( HotWires.UP + + HotWires.DOWN, + true)); // 9=HotWire Vertical + materials.addElement(new HotWires( HotWires.LEFT + + HotWires.RIGHT, + true)); // 10=HotWire Horizontal + materials.addElement(new HotWires( HotWires.UP + + HotWires.LEFT, + true)); // 11=HotWire J + materials.addElement(new HotWires( HotWires.UP + + HotWires.RIGHT, + true)); // 12=HotWire L + materials.addElement(new HotWires(+ HotWires.DOWN + + HotWires.LEFT, + true)); // 13=HotWire 7 + materials.addElement(new HotWires(+ HotWires.DOWN + + HotWires.RIGHT, + true)); // 14=HotWire r + materials.addElement(new HotWires( HotWires.DOWN + + HotWires.LEFT + + HotWires.RIGHT, + true)); // 15=HotWire T + materials.addElement(new HotWires( HotWires.UP + + HotWires.LEFT + + HotWires.RIGHT, + true)); // 16=HotWire _|_ + materials.addElement(new HotWires( HotWires.UP + + HotWires.DOWN + + HotWires.RIGHT, + true)); // 17=HotWire |- + materials.addElement(new HotWires( HotWires.UP + + HotWires.DOWN + + HotWires.LEFT, + true)); // 18=HotWire -| + + int[][] redlock = { + {Lock.WIDE}, + {Lock.LEFT}, + {Lock.DOWN}, + {Lock.DOWN}, + {Lock.RIGHT}, + {1,5,0, 1,6,0, 1,2,3, 1,9,3}, + {1,4,0, 1,7,0, 1,1,3, 1,10,3, 2,5,0, 2,6,0, 2,2,3, 2,9,3}, + {2,4,0, 2,7,0, 2,1,3, 2,10,3, 3,5,0, 3,6,0, 3,2,3, 3,9,3}, + {3,4,0, 3,7,0, 3,1,3, 3,10,3}, + {Lock.REMOVE}, + {Lock.LEFT}, + {Lock.DOWN}, + {Lock.DOWN}, + {Lock.RIGHT}, + {3,4,3, 3,7,3, 3,1,0, 3,10,0}, + {2,4,3, 2,7,3, 2,1,0, 2,10,0, 3,5,3, 3,6,3, 3,2,0, 3,9,0}, + {1,4,3, 1,7,3, 1,1,0, 1,10,0, 2,5,3, 2,6,3, 2,2,0, 2,9,0}, + {1,5,3, 1,6,3, 1,2,0, 1,9,0} + }; + materials.addElement(new Lock(Color.red, Color.red, redlock)); // 19=RedLock + + int[][] orangelock = { + {Lock.WIDE}, + {Lock.RIGHT}, + {Lock.DOWN}, + {Lock.RIGHT}, + {4,5,0, 4,6,0, 4,2,4, 4,9,4}, + {4,4,0, 4,7,0, 4,1,4, 4,10,4, 5,5,0, 5,6,0, 5,2,4, 5,9,4}, + {5,4,0, 5,7,0, 5,1,4, 5,10,4, 6,5,0, 6,6,0, 6,2,4, 6,9,4}, + {6,4,0, 6,7,0, 6,1,4, 6,10,4}, + {Lock.REMOVE}, + {Lock.RIGHT}, + {Lock.DOWN}, + {Lock.RIGHT}, + {6,4,4, 6,7,4, 6,1,0, 6,10,0}, + {5,4,4, 5,7,4, 5,1,0, 5,10,0, 6,5,4, 6,6,4, 6,2,0, 6,9,0}, + {4,4,4, 4,7,4, 4,1,0, 4,10,0, 5,5,4, 5,6,4, 5,2,0, 5,9,0}, + {4,5,4, 4,6,4, 4,2,0, 4,9,0} + }; + materials.addElement(new Lock(new Color(255,128,0), + new Color(255,128,0), orangelock)); // 20=OrangeLock + + int[][] yellowlock = { + {Lock.WIDE}, + {Lock.LEFT}, + {Lock.DOWN}, + {Lock.RIGHT}, + {7,5,0, 7,6,0, 7,2,5, 7,9,5}, + {7,4,0, 7,7,0, 7,1,5, 7,10,5, 8,5,0, 8,6,0, 8,2,5, 8,9,5}, + {8,4,0, 8,7,0, 8,1,5, 8,10,5, 9,5,0, 9,6,0, 9,2,5, 9,9,5}, + {9,4,0, 9,7,0, 9,1,5, 9,10,5}, + {Lock.REMOVE}, + {Lock.LEFT}, + {Lock.DOWN}, + {Lock.RIGHT}, + {9,4,5, 9,7,5, 9,1,0, 9,10,0}, + {8,4,5, 8,7,5, 8,1,0, 8,10,0, 9,5,5, 9,6,5, 9,2,0, 9,9,0}, + {7,4,5, 7,7,5, 7,1,0, 7,10,0, 8,5,5, 8,6,5, 8,2,0, 8,9,0}, + {7,5,5, 7,6,5, 7,2,0, 7,9,0} + }; + materials.addElement(new Lock(Color.yellow, + Color.yellow, yellowlock)); // 21=YellowLock + + int[][] greenlock = { + {Lock.WIDE}, + {Lock.RIGHT}, + {Lock.UP}, + {Lock.RIGHT}, + {10,5,0, 10,6,0, 10,2,6, 10,9,6}, + {10,4,0, 10,7,0, 10,1,6, 10,10,6, 11,5,0, 11,6,0, 11,2,6, 11,9,6}, + {11,4,0, 11,7,0, 11,1,6, 11,10,6, 12,5,0, 12,6,0, 12,2,6, 12,9,6}, + {12,4,0, 12,7,0, 12,1,6, 12,10,6}, + {Lock.REMOVE}, + {Lock.RIGHT}, + {Lock.UP}, + {Lock.RIGHT}, + {12,4,6, 12,7,6, 12,1,0, 12,10,0}, + {11,4,6, 11,7,6, 11,1,0, 11,10,0, 12,5,6, 12,6,6, 12,2,0, 12,9,0}, + {10,4,6, 10,7,6, 10,1,0, 10,10,0, 11,5,6, 11,6,6, 11,2,0, 11,9,0}, + {10,5,6, 10,6,6, 10,2,0, 10,9,0} + }; + materials.addElement(new Lock(Color.green, + Color.green, greenlock)); // 22=GreenLock + + int[][] bluelock = { + {Lock.WIDE}, + {Lock.LEFT}, + {Lock.UP}, + {Lock.RIGHT}, + {13,5,0, 13,6,0, 13,2,1, 13,9,1}, + {13,4,0, 13,7,0, 13,1,1, 13,10,1, 14,5,0, 14,6,0, 14,2,1, 14,9,1}, + {14,4,0, 14,7,0, 14,1,1, 14,10,1, 15,5,0, 15,6,0, 15,2,1, 15,9,1}, + {15,4,0, 15,7,0, 15,1,1, 15,10,1}, + {Lock.REMOVE}, + {Lock.LEFT}, + {Lock.UP}, + {Lock.RIGHT}, + {15,4,1, 15,7,1, 15,1,0, 15,10,0}, + {14,4,1, 14,7,1, 14,1,0, 14,10,0, 15,5,1, 15,6,1, 15,2,0, 15,9,0}, + {13,4,1, 13,7,1, 13,1,0, 13,10,0, 14,5,1, 14,6,1, 14,2,0, 14,9,0}, + {13,5,1, 13,6,1, 13,2,0, 13,9,0} + }; + materials.addElement(new Lock(Color.blue, + Color.blue, bluelock)); // 23=BlueLock + + int[][] purplelock = { + {Lock.WIDE}, + {Lock.LEFT}, // Positioning is not set right yet. + {Lock.UP}, + {Lock.UP}, + {Lock.RIGHT}, + {16,5,0, 16,6,0, 16,2,7, 16,9,7}, + {16,4,0, 16,7,0, 16,1,7, 16,10,7, 17,5,0, 17,6,0, 17,2,7, 17,9,7}, + {17,4,0, 17,7,0, 17,1,7, 17,10,7, 18,5,0, 18,6,0, 18,2,7, 18,9,7}, + {18,4,0, 18,7,0, 18,1,7, 18,10,7}, + {Lock.REMOVE}, + {Lock.LEFT}, + {Lock.UP}, + {Lock.UP}, + {Lock.RIGHT}, + {18,4,7, 18,7,7, 18,1,0, 18,10,0}, + {17,4,7, 17,7,7, 17,1,0, 17,10,0, 18,5,7, 18,6,7, 18,2,0, 18,9,0}, + {16,4,7, 16,7,7, 16,1,0, 16,10,0, 17,5,7, 17,6,7, 17,2,0, 17,9,0}, + {16,5,7, 16,6,7, 16,2,0, 16,9,0} + }; + materials.addElement(new Lock(new Color(255,0,255), + new Color(255,0,255), purplelock)); // 24=PurpleLock + + String[] files = {"field0.jpg","field1.jpg"}; + materials.addElement(new PlayerBlocker(files)); // 25= Blue FF + + int flipswitch[][] = { + {Switch.WAIT4CONTACT}, + {Switch.SETVALUEHIGH}, + {Switch.REPLACE, 7,1,0, 8,1,0, 7,2,0, 8,2,0, 5,3,1, 6,3,1, 5,4,1, 6,4,1}, + {Switch.REPLACE, 11,1,0, 12,1,0, 11,2,0, 12,2,0, 9,3,1, 10,3,1, 9,4,1, 10,4,1}, + {Switch.REPLACE, 15,5,0, 16,5,0, 15,6,0, 16,6,0, 13,3,1, 14,3,1, 13,4,1, 14,4,1}, + {Switch.REPLACE, 3,9,0, 4,9,0, 3,10,0, 4,10,0, 1,7,1, 2,7,1, 1,8,1, 2,8,1}, + {Switch.REPLACE, 7,9,0, 8,9,0, 7,10,0, 8,10,0, 9,7,1, 10,7,1, 9,8,1, 10,8,1}, + {Switch.REPLACE, 11,5,0, 12,5,0, 11,6,0, 12,6,0, 13,7,1, 14,7,1, 13,8,1, 14,8,1}, + {Switch.REPLACE, 15,9,0, 16,9,0, 15,10,0, 16,10,0, 17,7,1, 18,7,1, 17,8,1, 18,8,1}, + {Switch.REPLACE, 18,10,0} + }; + materials.addElement(new Switch(Switch.ROT_DOWN, flipswitch)); // 26= FlipSwitch + + materials.addElement(new CrystalRecharger()); // 27 = Recharger + materials.addElement(new Portal("ROEndGame2.lvl", true, true)); // 28= Portal + + for (int a=0; a<=22; a++) + rooms.addElement(new Room()); + + {// Room 0 Help + Room room = (Room) rooms.elementAt(0); + room.AddTextBox("You're on your own here!", + 136,6*32, 560); + room.AddTextBox("(To continue, press RETURN.)", + 96,346, 500); + } + {// Room 1 Maze + Room room = (Room) rooms.elementAt(1); + int[][] table1 = { + {1,1,1,1,1,1,0,1,0,0,0,0,1,0,1,1,1,1,1,1}, + {1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1}, + {0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0}, + {1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}, + {0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0}, + {1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1}, + {1,1,1,1,1,1,0,1,0,0,0,0,1,0,1,1,1,1,1,1} + }; + room.RoomArray = table1; + + } + {// Room 1 Maze + Room room = (Room) rooms.elementAt(1); + int[][] table1 = { + {1,1,1,1,1,1,0,1,0,0,0,0,1,0,1,1,1,1,1,1}, + {1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1}, + {0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0}, + {1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}, + {0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0}, + {1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1}, + {1,1,1,1,1,1,0,1,0,0,0,0,1,0,1,1,1,1,1,1} + }; + room.RoomArray = table1; + + } + {// Room 2 Maze + Room room = (Room) rooms.elementAt(2); + room.SetMaterialFromRoom(1); + } + {// Room 3 Maze + Room room = (Room) rooms.elementAt(3); + room.SetMaterialFromRoom(1); + } + {// Room 4 Maze + Room room = (Room) rooms.elementAt(4); + room.SetMaterialFromRoom(1); + } + {// Room 5 Maze + Room room = (Room) rooms.elementAt(5); + room.SetMaterialFromRoom(1); + } + {// Room 6 Maze exit + Room room = (Room) rooms.elementAt(6); + int[][] table = { + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + + room.AddTextBox("Welcome to the Super Secret 6th level!",52,64, 560); + room.AddTextBox("{255,000,000} Cross {255,128,000} the {255,255,000} rainbow {000,255,000} bridge {000,000,255} to {255,000,255} freedom!", + 64,9*32, 560); +// items.addElement(new Key(2*28,3*32,room,Color.red)); +// items.addElement(new Key(2*28,4*32,room,new Color(255,128,0))); +// items.addElement(new Key(2*28,5*32,room,Color.yellow)); +// items.addElement(new Key(2*28,6*32,room,Color.green)); +// items.addElement(new Key(2*28,7*32,room,Color.blue)); +// items.addElement(new Key(2*28,8*32,room,new Color(255,0,255))); + } + + {// Room 7 Hallway + Room room = (Room) rooms.elementAt(7); + int[][] table = { + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Rainbow bridge",364, 6*32, 560); + room.AddArrow(559,6*32,Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 8 Rainbow Bridge + Room room = (Room) rooms.elementAt(8); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,3,3,3,4,4,4,5,5,5,6,6,6,1,1,1,7,7,7,2}, + {0,3,3,3,4,4,4,5,5,5,6,6,6,1,1,1,7,7,7,0}, + {0,3,3,3,4,4,4,5,5,5,6,6,6,1,1,1,7,7,7,0}, + {0,3,3,3,4,4,4,5,5,5,6,6,6,1,1,1,7,7,7,0}, + {0,3,3,3,4,4,4,5,5,5,6,6,6,1,1,1,7,7,7,0}, + {2,3,3,3,4,4,4,5,5,5,6,6,6,1,1,1,7,7,7,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + + } + {// Room 9 Hallway + Room room = (Room) rooms.elementAt(9); + int[][] table = { + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2} + }; + room.RoomArray = table; + + room.AddTextBox("Orange Lock", 28, 6*32, 560); + room.AddArrow(0, 6*32,Arrow.DIR_LEFT,28,Color.white); + room.AddTextBox("Yellow Lock", 400, 6*32, 560); + room.AddArrow(559,6*32,Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 10 Hallway + Room room = (Room) rooms.elementAt(10); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2} + }; + room.RoomArray = table; + + room.AddTextBox("Red Lock Map", 28, 9*32, 560); + room.AddArrow(0,9*32+16,Arrow.DIR_LEFT,28,Color.white); + room.AddTextBox("Red Lock", 436, 2*32, 560); + room.AddArrow(559,2*32+16,Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 11 Hallway + Room room = (Room) rooms.elementAt(11); + int[][] table = { + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2} + }; + room.RoomArray = table; + + room.AddTextBox("Green Lock", 28, 6*32, 560); + room.AddArrow(0, 6*32,Arrow.DIR_LEFT,28,Color.white); + room.AddTextBox("Blue Lock", 424, 6*32, 560); + room.AddArrow(559,6*32,Arrow.DIR_RIGHT,28,Color.white); + } + {// Room 12 Hallway + Room room = (Room) rooms.elementAt(12); + int[][] table = { + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + + room.AddTextBox("Purple Lock", 400, 6*32, 560); + room.AddArrow(559,6*32,Arrow.DIR_RIGHT,28,Color.white); + } + + {// Room 13 Red Lock upper + Room room = (Room) rooms.elementAt(13); + int[][] table = { + {10,10,10,10,10,10,10,15,10,10,10,10,10,10,10,10,10,10,10,13}, + { 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,19, 9}, + {14,10,10,13, 0, 0, 0, 9, 0, 0, 0,14,10,10,10,10,10,10,10,18}, + { 9, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 9}, + { 9, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 9}, + { 9, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 9}, + { 9, 0, 0, 0,14,10,10,16,10,10,10,10,10,10,10,18, 0, 0, 0, 9} + }; + room.RoomArray = table; + int[] pace = {2*28,2*32, 2*28, 9*32}; + int[] program = {4*28,0, 18*28,11*32, 0,2*32}; + items.addElement(new Sentry(5*28,2*32,room,pace,program,true)); + } + {// Room 14 Red Lock lower + Room room = (Room) rooms.elementAt(14); + int[][] table = { + { 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 9, 0, 0, 0,10,10,10,10,10,10,10,10,10,10,10,18}, + { 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0,12,10,10,10,10,10,10,10,10,10,10,10, 0, 0, 0, 9}, + { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, + {12,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11} + }; + room.RoomArray = table; + + } + {// Room 15 Red Lock map upper (lower) + Room room = (Room) rooms.elementAt(15); + int[][] table = { + {1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1}, + {1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1}, + {1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1}, + {1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1}, + {1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1}, + {1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1}, + {1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,0,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + } + {// Room 16 Red Lock map lower (upper) + Room room = (Room) rooms.elementAt(16); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1} + }; + room.RoomArray = table; + + } + {// Room 17 Orange Lock (pac-man) + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1}, + {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1}, + {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,25, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,25, 0, 0, 0, 0}, + {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0}, + {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,20, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + items.addElement(new Pellet(2*28-14,2*32-14,room)); + items.addElement(new Pellet(4*28-14,2*32-14,room)); + items.addElement(new Pellet(6*28-14,2*32-14,room)); + items.addElement(new Pellet(8*28-14,2*32-14,room)); + items.addElement(new Pellet(10*28-14,2*32-14,room)); + items.addElement(new Pellet(12*28-14,2*32-14,room)); + items.addElement(new Pellet(14*28-14,2*32-14,room)); + items.addElement(new Pellet(2*28-14,4*32-14,room)); + items.addElement(new Pellet(6*28-14,4*32-14,room)); + items.addElement(new Pellet(10*28-14,4*32-14,room)); + items.addElement(new Pellet(14*28-14,4*32-14,room)); + items.addElement(new Pellet(2*28-14,6*32-14,room)); + items.addElement(new Pellet(4*28-14,6*32-14,room)); + items.addElement(new Pellet(6*28-14,6*32-14,room)); + items.addElement(new Pellet(8*28-14,6*32-14,room)); + items.addElement(new Pellet(10*28-14,6*32-14,room)); + items.addElement(new Pellet(12*28-14,6*32-14,room)); + items.addElement(new Pellet(14*28-14,6*32-14,room)); + items.addElement(new Pellet(2*28-14,8*32-14,room)); + items.addElement(new Pellet(6*28-14,8*32-14,room)); + items.addElement(new Pellet(10*28-14,8*32-14,room)); + items.addElement(new Pellet(14*28-14,8*32-14,room)); + items.addElement(new Pellet(2*28-14,10*32-14,room)); + items.addElement(new Pellet(4*28-14,10*32-14,room)); + items.addElement(new Pellet(6*28-14,10*32-14,room)); + items.addElement(new Pellet(8*28-14,10*32-14,room)); + items.addElement(new Pellet(10*28-14,10*32-14,room)); + items.addElement(new Pellet(12*28-14,10*32-14,room)); + items.addElement(new Pellet(14*28-14,10*32-14,room)); + items.addElement(new Ghost(42,48,room)); + items.addElement(new DirectionalSensor(16*28+8,4*32+16,room, + new Ghost(0,0,null))); + } + {// Room 18 Yellow Lock (Hot tunnel) + Room room = (Room) rooms.elementAt(18); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,21, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + items.addElement(new Wave(room)); + + int[] pace = {2*28,2*32, 2*28, 9*32}; + int[] program = {4*28,0, 18*28,11*32, 0,5*32}; + items.addElement(new Sentry(5*28,2*32,room,pace,program,true)); + } + {// Room 19 Green Lock (Turbines) + Room room = (Room) rooms.elementAt(19); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,22, 1, 0, 0, 0, 0, 0, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + int[] cells1 = {12,3,0,1, 11,3,0,1, 10,3,0,1, 9,3,0,1, 8,3,0,1, 7,3,0,1}; + items.addElement(new Turbine(28,9*32,room,cells1)); + int[] cells2 = {12,5,0,1, 11,5,0,1, 10,5,0,1, 9,5,0,1, 8,5,0,1, 7,5,0,1}; + items.addElement(new Turbine(5*28,9*32,room,cells2)); + int[] pace = {6*28,2*32, 13*28,2*32}; + int[] program = {28,32, 15*28,10*32, 19*28,5*32}; + items.addElement(new Sentry(6*28,2*32,room,pace,program, true)); + } + {// Room 20 Blue Lock (Flip Maze) + Room room = (Room) rooms.elementAt(20); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 1}, + {0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 1}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1}, + {0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1}, + {0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 1}, + {1, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 1}, + {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1}, + {1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0,26,23}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + + int[] pace = {2*28,2*32, 2*28, 9*32}; + int[] program = {4*28,0, 18*28,11*32, 0,5*32}; + items.addElement(new Sentry(5*28,2*32,room,pace,program,true)); + } + {// Room 21 Purple Lock (4 Pull Locks) + Room room = (Room) rooms.elementAt(21); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 1, 0, 0, 0,24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + items.addElement(new WallHandle(11*28,3*32+8,room)); + items.addElement(new WallHandle(11*28,5*32+8,room)); + items.addElement(new WallHandle(11*28,7*32+8,room)); + items.addElement(new WallHandle(11*28,9*32+8,room)); + int[] pace = {2*28,2*32, 2*28, 9*32}; + int[] program = {4*28,0, 18*28,11*32, 0,5*32}; + items.addElement(new Sentry(5*28,2*32,room,pace,program,true)); + } + + {// Room 22 Final Portal! + Room room = (Room) rooms.elementAt(22); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0,28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + room.AddTextBox("You did it! You beat the Secret 6th level!",2*28,2*32,500); + room.AddTextBox("Believe it or not, you have now accomplished something that Tom hasn't even done yet.!", + 2*28,5*32,500); + String[] helperlist = { + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper7.gif","helper6.gif","helper7.gif","helper6.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper1.gif","helper4.gif","helper2.gif","helper3.gif", + "helper0.gif","helper0.gif","helper0.gif","helper0.gif", + "helper5.gif","helper5.gif","helper5.gif","helper5.gif", + }; + Graphix helper = new Graphix(helperlist,15*28, 8*32); + room.graphix.addElement(helper); + } + + for (int a=1; a<=5; a++) + { + Room roomA = (Room) rooms.elementAt(a); + Room room1 = (Room) rooms.elementAt(1); + roomA.upRoom = room1; + roomA.downRoom = room1; + roomA.leftRoom = room1; + roomA.rightRoom = room1; + } + + ((Room) rooms.elementAt(1)).leftRoom = (Room) rooms.elementAt(2); + ((Room) rooms.elementAt(2)).upRoom = (Room) rooms.elementAt(3); + ((Room) rooms.elementAt(3)).rightRoom = (Room) rooms.elementAt(4); + ((Room) rooms.elementAt(4)).leftRoom = (Room) rooms.elementAt(5); + ((Room) rooms.elementAt(5)).downRoom = (Room) rooms.elementAt(6); + ((Room) rooms.elementAt(6)).upRoom = (Room) rooms.elementAt(1); + + LinkRoomsLeftRight(6,7); + LinkRoomsLeftRight(7,8); + LinkRoomsLeftRight(8,22); + + int[] list1 = {10,9,7,11,12}; + LinkRoomsVertically(list1); + + LinkRoomsUpDown(16,15); + LinkRoomsUpDown(13,14); + LinkRoomsLeftRight(15,10); + LinkRoomsLeftRight(10,13); + LinkRoomsLeftRight(17,9); + LinkRoomsLeftRight(9,18); + LinkRoomsLeftRight(19,11); + LinkRoomsLeftRight(11,20); + LinkRoomsLeftRight(12,21); + + gameCursor = new GameCursor(9*28+14,5*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} \ No newline at end of file diff --git a/src/com/droidquest/levels/ROEndGame.java b/src/com/droidquest/levels/ROEndGame.java new file mode 100644 index 0000000..af9bccb --- /dev/null +++ b/src/com/droidquest/levels/ROEndGame.java @@ -0,0 +1,165 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.items.EndAnimation; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class ROEndGame extends Level +{ +public ROEndGame (RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0 = Empty Space + materials.addElement(new Material(new Color(0,0,255),false, true)); // 1 = Blue + materials.addElement(new Portal("MainMenu.lvl",false,false)); // 2 = Portal + + int[][] program1 = { + {Lock.NARROW}, + {4,5,0, 4,6,0}, + {4,4,0, 4,7,0}, + {Lock.NARROW}, + {4,4,1, 4,7,1}, + {4,5,1, 4,6,1}, + }; + materials.addElement(new Lock(Color.green, Color.green, program1 )); // 3=Green Lock + + int[][] program2 = { + {Lock.NARROW}, + {7,5,0, 7,6,0}, + {7,4,0, 7,7,0}, + {Lock.NARROW}, + {7,4,1, 7,7,1}, + {7,5,1, 7,6,1}, + }; + materials.addElement(new Lock(Color.yellow, Color.yellow, program2)); // 4=yellow Lock + + int[][] program3 = { + {Lock.NARROW}, + {10,5,0, 10,6,0}, + {10,4,0, 10,7,0}, + {Lock.NARROW}, + {10,4,1, 10,7,1}, + {10,5,1, 10,6,1}, + }; + materials.addElement(new Lock(Color.red, Color.red, program3)); // 5=red Lock + + int[][] program4 = { + {Lock.NARROW}, + {13,5,0, 13,6,0}, + {13,4,0, 13,7,0}, + {Lock.NARROW}, + {13,4,1, 13,7,1}, + {13,5,1, 13,6,1}, + }; + materials.addElement(new Lock(new Color(255,128,0), new Color(255,128,0), program4)); // 6=Orange lock + + int[][] program5 = { + {Lock.NARROW}, + {16,5,0, 16,6,0}, + {16,4,0, 16,7,0}, + {Lock.NARROW}, + {16,4,1, 16,7,1}, + {16,5,1, 16,6,1}, + }; + materials.addElement(new Lock(new Color(255,0,255), new Color(255,0,255), program5)); // 7=purple Lock + + materials.addElement(new Portal("RO6.lvl",true,true)); // 8=portal + + + for (int a=0; a<3; a++) + rooms.addElement(new Room()); + + {// Room 0 Help + Room room = (Room) rooms.elementAt(0); + int[][] table = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} + }; + room.RoomArray = table; + room.AddTextBox("No help here. Press Return.", + 118, 5*32, 450); + } + + {// Room 1 Portal to Main Menu + Room room = (Room) rooms.elementAt(1); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {255,000,000} CONGRATULATIONS!",64,64, 500); + room.AddTextBox("You are one of the few, true",112,4*32, 560); + room.AddTextBox("Robot Masters.",196,4*32+20, 560); + room.AddTextBox("Return to the Main Menu",2*28,10*32+24, 500); + room.AddArrow(360,10*32+16,Arrow.DIR_RIGHT,28,Color.white); + items.addElement(new EndAnimation(room)); + } + + {// Room 2 Locks to Secret Level + Room room = (Room) rooms.elementAt(2); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,8,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1}, + {0,0,0,3,1,0,4,1,0,5,1,0,6,1,0,7,1,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("You may want to take the keys with you...",24,24, 560); + } + + LinkRoomsLeftRight(1,2); + + gameCursor = new GameCursor(10*28,8*32,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/ROEndGame2.java b/src/com/droidquest/levels/ROEndGame2.java new file mode 100644 index 0000000..deeb447 --- /dev/null +++ b/src/com/droidquest/levels/ROEndGame2.java @@ -0,0 +1,89 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.items.EndAnimation; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class ROEndGame2 extends Level +{ +public ROEndGame2 (RoomDisplay rd) + { + super(rd); + + materials.addElement(new Material(true, false)); // 0 = Empty Space + materials.addElement(new Material(new Color(0,0,255),false, true)); // 1 = Blue + materials.addElement(new Portal("MainMenu.lvl",true,false)); // 2 = Portal + + for (int a=0; a<2; a++) + rooms.addElement(new Room()); + + {// Room 0 Help + Room room = (Room) rooms.elementAt(0); + int[][] table = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} + }; + room.RoomArray = table; + room.AddTextBox("No help here. Press Return.", + 118, 5*32, 450); + } + + {// Room 1 Portal to Main Menu + Room room = (Room) rooms.elementAt(1); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + + room.AddTextBox("{BIG} {255,000,000} CONGRATULATIONS!",64,64, 500); + room.AddTextBox("You are one of the rare and elite",82,4*32, 560); + room.AddTextBox("Robot Lords.",214,5*32+20, 560); + room.AddTextBox("Return to the Main Menu",2*28,10*32+24, 500); + room.AddArrow(360,10*32+16,Arrow.DIR_RIGHT,28,Color.white); + items.addElement(new EndAnimation(room)); + } + + gameCursor = new GameCursor(10*28,8*32,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/ROLab.java b/src/com/droidquest/levels/ROLab.java new file mode 100644 index 0000000..b0e102e --- /dev/null +++ b/src/com/droidquest/levels/ROLab.java @@ -0,0 +1,605 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.LabCursor; +import com.droidquest.avatars.PaintBrush; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.PortDevice; +import com.droidquest.devices.PrototypeChip; +import com.droidquest.devices.RoomSensor; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.AutoWire; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Burner; +import com.droidquest.items.Crystal; +import com.droidquest.items.Factory; +import com.droidquest.items.Hexagon; +import com.droidquest.items.Key; +import com.droidquest.items.MazeControl; +import com.droidquest.items.MazeCreator; +import com.droidquest.items.MazeLock; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.PC16Button; +import com.droidquest.items.PC32Button; +import com.droidquest.items.PCButton; +import com.droidquest.items.SpeedControl; +import com.droidquest.items.Square; +import com.droidquest.items.ToolBox; +import com.droidquest.items.Triangle; +import com.droidquest.items.UnBurner; +import com.droidquest.items.WhiteRobot; +import com.droidquest.items.WireTester; +import com.droidquest.materials.ChipTester; +import com.droidquest.materials.ChipTrash; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.PrototypeBurner; +import com.droidquest.materials.ShapeEditor; +import com.droidquest.materials.SmallChipBurner; + +class ROLab extends Level +{ +public ROLab(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 3, Red Wall + materials.addElement(new Material(new Color(255,0,0),false, true)); + // Material 4, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, false)); + // Material 5, CrystalRecharger + materials.addElement(new CrystalRecharger()); + // Material 6, Crystal Shape Editor + materials.addElement(new ShapeEditor(new Crystal(0,0,null,0))); + // Material 7, Hexagon Shape Editor + materials.addElement(new ShapeEditor(new Hexagon(0,0,null,Color.blue))); + // Material 8, Square Shape Editor + materials.addElement(new ShapeEditor(new Square(0,0,null,Color.white))); + // Material 9, Triangle Shape Editor + materials.addElement(new ShapeEditor(new Triangle(0,0,null,new Color(255,128,0)))); + // Material 10, PrototypeBurner + materials.addElement(new PrototypeBurner()); + // Material 11, SmallChipBurner + materials.addElement(new SmallChipBurner()); + // Material 12, ChipTrash + materials.addElement(new ChipTrash()); + // Material 13, ChipTester + materials.addElement(new ChipTester()); + // Material 14, Lock + int[][] lockProgram = { + {Lock.NARROW}, + {0,1,1, 19,1,1}, + {0,2,1, 19,2,1}, + {0,3,1, 19,3,1}, + {Lock.NARROW}, + {0,3,0, 19,3,0}, + {0,2,0, 19,2,0}, + {0,1,0, 19,1,0}, + }; + materials.addElement(new Lock(new Color(192,192,255), Color.white, lockProgram)); + // Materials 15, MazeLock + materials.addElement(new MazeLock()); + + + for (int a=0; a<18; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + int[][] table = { + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table; + room.AddTextBox("Use the Innovation Lab to design and test circuits in robots and the large prototype chip.", + 2*28, 2*32, 500); + room.AddTextBox("Burn a small chip from your prototype chip in the burn room.", + 2*28, 5*32, 500); + room.AddTextBox("Change maze walls with the paint brush. Change sensor bodies and maze objects in the Shape Editor.", + 2*28, 7*32, 500); + room.AddTextBox("For help, see Tutorials.", + 2*28, 10*32, 500); + room.AddTextBox("(To go to Lab, press Return.)", + 4*28, 11*32, 500); + } + { // Room 1, Chip Testing Room + Room room = (Room) rooms.elementAt(1); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 1,13,13,13,13,13,13, 1, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 1,13,13,13,13,13,13, 1, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 1,13,13,13,13,13,13, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 1,13,13,13,13,13,13, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 1,13,13,13,13,13,13, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + room.AddTextBox("{000,000,000} Chip Tester", (560-(11*12))/2, 32+24, 500); + PortDevice[] portdevices = new PortDevice[8]; + portdevices[0] = new PortDevice(6*28+4,3*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[1] = new PortDevice(6*28+4,4*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[2] = new PortDevice(6*28+4,5*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[3] = new PortDevice(6*28+4,6*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[4] = new PortDevice(12*28+4,6*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[5] = new PortDevice(12*28+4,5*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[6] = new PortDevice(12*28+4,4*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[7] = new PortDevice(12*28+4,3*32+4,room,28,Port.TYPE_UNDEFINED); + portdevices[0].rotate(1); + portdevices[1].rotate(1); + portdevices[2].rotate(1); + portdevices[3].rotate(1); + portdevices[4].rotate(-1); + portdevices[5].rotate(-1); + portdevices[6].rotate(-1); + portdevices[7].rotate(-1); + for (int a=0; a<8; a++) + items.addElement(portdevices[a]); + items.addElement(new AutoWire(2*28,10*32,room)); + items.addElement(new WireTester(5*28,3*32,room,portdevices[0])); + items.addElement(new WireTester(5*28,4*32,room,portdevices[1])); + items.addElement(new WireTester(5*28,5*32,room,portdevices[2])); + items.addElement(new WireTester(5*28,6*32,room,portdevices[3])); + items.addElement(new WireTester(14*28+2,6*32,room,portdevices[4])); + items.addElement(new WireTester(14*28+2,5*32,room,portdevices[5])); + items.addElement(new WireTester(14*28+2,4*32,room,portdevices[6])); + items.addElement(new WireTester(14*28+2,3*32,room,portdevices[7])); + room.AddArrow(3*28,10*32+16,Arrow.DIR_LEFT,28,Color.white); + room.AddTextBox("Autowirer",4*28,11*32-8,200); + } + { // Room 2, Storage Space 1 + Room room = (Room) rooms.elementAt(2); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("Storage Space", 2*28, 2*32, 500); + } + { // Room 3, Storage Space 2 + Room room = (Room) rooms.elementAt(3); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + } + { // Room 4, Burner Room + Room room = (Room) rooms.elementAt(4); + int[][] table = { + {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 2,10,10,10,10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 2,10,10,10,10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 2,10,10,10,10, 2, 0, 0, 0, 2,11,11, 2, 0, 0, 0, 0, 0}, + {2, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2,11,11, 2, 0, 0, 0, 0, 0}, + {2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table; + room.AddTextBox("Burner Room", 2*28, 2*32, 200); + room.AddTextBox("1x",15*28-14,11*32-8,100); + items.addElement(new SpeedControl(15*28,7*32,room,SpeedControl.DIR_UP)); + items.addElement(new SpeedControl(15*28,9*32,room,SpeedControl.DIR_DOWN)); + items.addElement(new SmallChip(12*28, 1*32+16, room, "1")); + items.addElement(new SmallChip(14*28, 1*32+16, room, "2")); + items.addElement(new SmallChip(16*28, 1*32+16, room, "3")); + items.addElement(new SmallChip(18*28, 1*32+16, room, "4")); + items.addElement(new SmallChip(12*28, 3*32, room, "5")); + items.addElement(new SmallChip(14*28, 3*32, room, "6")); + items.addElement(new SmallChip(16*28, 3*32, room, "7")); + items.addElement(new SmallChip(18*28, 3*32, room, "8")); + items.addElement(new Burner(18*28, 10*32+2, room)); + items.addElement(new UnBurner(2*28, 10*32+2, room)); + room.AddTextBox("{000,000,000} Unburner", 1*28, 12*32-8, 200); + room.AddTextBox("{000,000,000} Burner", 17*28, 12*32-8, 200); + } + { // Room 5, Title Room + Room room = (Room) rooms.elementAt(5); + int[][] table = { + {1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1} + }; + room.RoomArray = table; + room.AddTextBox("{BIG} Innovation Lab", 3*28, 2*32, 600); + items.addElement(new PrototypeChip(8*28, 4*32, room)); + items.addElement(new BlueRobot(4*28, 8*32, room)); + items.addElement(new WhiteRobot(9*28, 8*32, room)); + items.addElement(new OrangeRobot(14*28, 8*32, room)); + } + { // Room 6, Chip Factory + Room room = (Room) rooms.elementAt(6); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,12,12,12,12, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,12,12,12,12, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,12,12,12,12, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + room.AddTextBox("Chip Factory", 2*28, 2*32, 500); + room.AddTextBox("Press for Prototype", 5*28, 9*32+18, 500); + room.AddTextBox("Press for Small Chip", 5*28, 10*32+18, 500); + room.AddTextBox("TRASH", 16*28-2, 9*32, 500); + room.AddArrow(3*28+14,9*32+12, Arrow.DIR_LEFT, 28, Color.white); + room.AddArrow(3*28+14,10*32+12, Arrow.DIR_LEFT, 28, Color.white); + items.addElement(new PCButton(2*28, 9*32, room)); + items.addElement(new Factory(2*28, 10*32, room, new SmallChip(0,0,null,"X"))); + items.addElement(new PC16Button(18*28,1*32,room)); + items.addElement(new PC32Button(18*28,2*32,room)); + room.AddTextBox("16 Pin", 15*28, 1*32+14, 500); + room.AddTextBox("32 Pin", 15*28, 2*32+14, 500); + } + { // Room 7, Sensor & Object Factory + Room room = (Room) rooms.elementAt(7); + int[][] table = { + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1,12,12,12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1,12,12,12, 1, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 1}, + {1,12,12,12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + }; + room.RoomArray = table; + + Triangle t = new Triangle(0,0, null, new Color(255,128,0)); + items.addElement(new Factory(2*28, 3*32, room, t)); + items.addElement(new Factory(5*28, 3*32, room, + new ContactSensor(0,0,null, t))); + items.addElement(new Factory(8*28, 3*32, room, + new RoomSensor(0,0,null, t))); + items.addElement(new Factory(12*28, 3*32, room, + new DirectionalSensor(0,0,null,t))); + + room.AddTextBox("Sensor & Object Factory", 142, 2*32-8, 500); + room.AddTextBox("Shape Editor Icons", 228, 8*32, 400); + room.AddTextBox("TRASH", 40, 9*32, 400); + +// items.addElement(new Crystal(2*28,10*32,room,100000)); +// items.addElement(new Crystal(5*28,10*32,room,100000)); +// items.addElement(new Square(8*28,10*32,room,Color.white)); +// items.addElement(new Triangle(11*28,10*32,room,Color.blue)); +// items.addElement(new Hexagon(14*28,10*32,room,new Color(255,128,0))); +// items.addElement(new Crystal(17*28,10*32,room,0)); +// items.addElement(new ContactSensor(3*28,2*32,room,new Square(0,0,null,Color.white))); +// items.addElement(new ContactSensor(9*28,2*32,room,new Crystal(0,0,null,0))); +// items.addElement(new ContactSensor(15*28,2*32,room,new Hexagon(0,0,null,Color.white))); +// items.addElement(new RoomSensor(3*28,4*32,room,new Crystal(0,0,null,0))); +// items.addElement(new RoomSensor(9*28,4*32,room,new Hexagon(0,0,null,Color.white))); +// items.addElement(new RoomSensor(15*28,4*32,room,new Triangle(0,0,null,Color.white))); +// items.addElement(new DirectionalSensor(2*28,6*32,room,new Hexagon(0,0,null,Color.white))); +// items.addElement(new DirectionalSensor(8*28,6*32,room,new Triangle(0,0,null,Color.white))); +// items.addElement(new DirectionalSensor(14*28,6*32,room,new Square(0,0,null,Color.white))); + } + { // Room 8, Recharger Room + Room room = (Room) rooms.elementAt(8); + int[][] table = { + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,14}, + {1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("To Maze", 2*28, 11*32, 200); + room.AddArrow(28+14,12*32-1, Arrow.DIR_DOWN, 32, Color.white); + room.AddArrow(28+14,12*32-1, Arrow.DIR_DOWN, 32, Color.white); + items.addElement(new Key(15*28+16, 10*32+12, room, Color.white)); + } + { // Room 9, Maze Control Room + Room room = (Room) rooms.elementAt(9); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("Maze Control Room", 178, 2*32, 300); + room.AddTextBox("4x2", 262, 5*32+24, 500); + items.addElement(new MazeControl(9*28+14,3*32+6,room,MazeControl.DIR_UP)); + items.addElement(new MazeControl(9*28+14,7*32,room,MazeControl.DIR_DOWN)); + items.addElement(new MazeControl(7*28+2,5*32+4,room,MazeControl.DIR_LEFT)); + items.addElement(new MazeControl(12*28,5*32+4,room,MazeControl.DIR_RIGHT)); + items.addElement(new MazeCreator(2*28, 10*32, room)); + room.AddArrow(3*28+14,10*32+12, Arrow.DIR_LEFT, 28, Color.white); + room.AddTextBox("Press to resize Maze", 5*28, 10*32+18, 500); + room.AddArrow(18*28,10*32, Arrow.DIR_DOWN, 28, Color.white); + room.AddTextBox("Lock", 17*28+14, 9*32, 100); + } + { // Room 10, Maze Top Far Left + Room room = (Room) rooms.elementAt(10); + int[][] table = { + {3,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {3,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 11, Maze Top Near Left + Room room = (Room) rooms.elementAt(11); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 12, Maze Top Near Right + Room room = (Room) rooms.elementAt(12); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 13, Maze Top Far Right + Room room =(Room) rooms.elementAt(13); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,3} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 14, Maze Bot Far Left + Room room = (Room) rooms.elementAt(14); + int[][] table = { + {3,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 15, Maze Bot Near Left + Room room = (Room) rooms.elementAt(15); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 16, Maze Bot Near Right + Room room = (Room) rooms.elementAt(16); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 17, Maze Bot Far Right + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.editable=true; + } + + // 00=Help + // + // 01-02-03 + // 04-05-06 + // 07-08-09 + // + // 10+ = Maze + // 10-11-12-13 + // 14-15-16-17 + + // 15-16-17 + // 00-01-14 + // 02-03-04 + // + // 05-06-07-08 + // 09-10-11-12 + + int[][] roomgrid1={ + {1,2,3}, + {4,5,6}, + {7,8,9} + }; + LinkRoomsGrid(roomgrid1); + + LinkRoomsLeftRight(6,4); + + int[][] roomgrid2={ + {10,11,12,13}, + {14,15,16,17} + }; + LinkRoomsGrid(roomgrid2); + + LinkRoomsUpDown(8,10); + + gameCursor = new LabCursor(9*28+14,9*32+16,(Room) rooms.elementAt(5)); + solderingPen = new SolderingPen(); + remote = new Remote(); + toolbox = new ToolBox(7*28,10*32, (Room) rooms.elementAt(8)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + items.addElement(toolbox); ((ToolBox)toolbox).Toggle(); + paintbrush = new PaintBrush(); + items.addElement(paintbrush); + items.addElement(gameCursor); + items.addElement(solderingPen); + items.addElement(remote); + items.addElement(helpCam); + player = gameCursor; + currentViewer = player; + } + +} diff --git a/src/com/droidquest/levels/ROTut1.java b/src/com/droidquest/levels/ROTut1.java new file mode 100644 index 0000000..b20dfea --- /dev/null +++ b/src/com/droidquest/levels/ROTut1.java @@ -0,0 +1,672 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Arrow; +import com.droidquest.decorations.Graphix; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.Device; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.NOTGate; +import com.droidquest.devices.PortDevice; +import com.droidquest.devices.RoomSensor; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Crystal; +import com.droidquest.items.GenericRobot; +import com.droidquest.items.Item; +import com.droidquest.items.Key; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.SentryT1; +import com.droidquest.items.Square; +import com.droidquest.items.Triangle; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class ROTut1 extends Level +{ +public ROTut1(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 3, Orange Wall + materials.addElement(new Material(new Color(255,128,0),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, CrystalRecharger + materials.addElement(new CrystalRecharger()); + // Material 6, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 7, LockT1 + int[][] lockProgram = { + {Lock.NARROW}, + {12,10,0 }, + {12,9,0, 12,6,1}, + {12,8,0, 12,5,1}, + {Lock.NARROW}, + {12,5,0, 12,8,1}, + {12,6,0, 12,9,1}, + {12,10,1}, + }; + materials.addElement(new Lock(Color.white, Color.blue, lockProgram)); + // Material 8, Portal to Tutorial 2; + materials.addElement(new Portal("ROTut2.lvl",false, true)); + // Material 9, Portal to Main Menu; + materials.addElement(new Portal("MainMenu.lvl",false, true)); + + for (int a=0; a<34; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,2); + room.AddTextBox("Use the Menubar above to turn sound on or off, or to return to the Main Menu level", 2*28, 4*32, 450); + room.AddTextBox("Press ? to get help or hints", 2*28, 8*32, 500); + room.AddTextBox("To continue, press RETURN", 4*28, 10*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,5,19,7,0); + room.SetMaterial(0,10,0); + room.AddTextBox("{BIG} ROBOT ANATOMY", 4*28, 2*32, 500); + room.AddTextBox("In ROBOT ANATOMY, you will learn how to move, how to handle objects, and how robots ", + 2*28, 3*32, 500); + room.AddTextBox("- Move", 6*28, 5*32, 500); + room.AddTextBox("- Send Signals", 6*28, 6*32, 500); + room.AddTextBox("- Grab Objects", 6*28, 7*32, 500); + room.AddTextBox("- Detect Objects", 6*28, 8*32, 500); + room.AddTextBox("Follow the Arrows", 6*28, 10*32, 500); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Movement + Room room = (Room) rooms.elementAt(2); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(0,5,19,7,0); + room.AddTextBox("You can move the cursor using the Arrow keys on your keyboard, or by clicking anywhere on the screen with the mouse.", + 2*28, 2*32, 500); + room.AddTextBox("Click here", 3*28, 8*32, 500); + room.AddArrow(5*28,6*32+16, Arrow.DIR_UP, 28, Color.white) ; + room.AddTextBox("Double-Click here", 12*28+14, 8*32, 160); + room.AddArrow(15*28,6*32+16, Arrow.DIR_UP, 28, Color.white) ; + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 3, Movement 2 + Room room = (Room) rooms.elementAt(3); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(0,5,19,7,0); + room.AddTextBox("Double-Clicking the mouse on one side of the cursor starts your cursor moving in that direction until it reaches a wall or the next room.", + 2*28, 2*32, 500); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 4, Pick up Key + Room room = (Room) rooms.elementAt(4); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("You can pick up and drop objects.", + 2*28, 2*32, 500); + room.AddTextBox("To pick up an object, move on top of it and press the SPACEBAR (or Right-Click the mouse).", + 2*28, 3*32, 500); + room.AddTextBox("Pick up this key and move it around. To drop it, press the SPACEBAR again.", + 2*28, 8*32, 500); + room.AddTextBox("Take the Key with you", + 6*28, 10*32+16, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new Key(9*28, 5*32, room, Color.blue)); + } + { // Room 5, Locked Sentry + Room room = (Room) rooms.elementAt(5); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(8,11,11,11,0); + room.SetMaterialOutline(12,7,19,11,1); + room.SetMaterial(12,7,7); + room.AddTextBox("You can move in small steps. Press the control key and the cursor keys at the same time.", + 2*28, 2*32, 500); + room.AddTextBox("This sentry is trapped.", + 2*28, 4*32+16, 500); + room.AddTextBox("To let it out, hold the key by the HANDLE. Use small steps to put the key in the lock.", + 2*28, 6*32, 500); + room.AddArrow(10*28, 383, Arrow.DIR_DOWN, 28, Color.white) ; + items.addElement(new SentryT1(17*28, 9*32+16, room)); + } + { // Room 6, Blue Robot + Room room = (Room) rooms.elementAt(6); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(8,0,11,0,0); + room.SetMaterialOutline(16,11,18,11,0); + room.AddTextBox("This is a robot. You can go inside it.", + 2*28, 2*32, 350); + room.AddTextBox("To go inside, line yourself up with one of the robot's white BUMPERS and move in slowly. It may take a few tries.", + 2*28, 4*32, 350); + room.AddTextBox("Go inside and explore.", + 2*28, 9*32, 350); + room.AddTextBox("Come back and take the robot with you.", + 2*28, 10*32, 350); + room.AddArrow(17*28+14, 383, Arrow.DIR_DOWN, 28, Color.white); + room.AddTextBox("BUMPER", + 15*28, 4*32+16, 350); + room.AddArrow(15*28+2, 3*32+2, Arrow.DIR_UP, 28, Color.white); + GenericRobot robot = new BlueRobot(15*28,2*32,room); + items.addElement(robot); + { + robot.charge = 0; + robot.thrusterPower=true; + Wire dummy; + dummy = new Wire(((GenericRobot)robot).devices[7].ports[0], + ((GenericRobot)robot).devices[0].ports[0]); + dummy = new Wire(((GenericRobot)robot).devices[1].ports[0], + ((GenericRobot)robot).devices[4].ports[0]); + dummy = new Wire(((GenericRobot)robot).devices[3].ports[0], + ((GenericRobot)robot).devices[6].ports[0]); + dummy = new Wire(((GenericRobot)robot).devices[5].ports[0], + ((GenericRobot)robot).devices[2].ports[0]); + robot.InternalRoom.AddTextBox("GRABBER", 7*28, 2*32+20, 100); + robot.InternalRoom.AddTextBox("ANTENNA", 7*28, 4*32-8, 100); + robot.InternalRoom.AddTextBox("BUMPER", 3*28, 6*32, 100); + robot.InternalRoom.AddTextBox("BATTERY", 6*28, 9*32+24, 100); + robot.InternalRoom.AddTextBox("SWITCH", 13*28+8, 10*32-8, 100); + robot.InternalRoom.AddTextBox("THRUSTER", 14*28, 5*32, 100); + robot.InternalRoom.AddTextBox("EYE", 13*28, 3*32, 100); + robot.InternalRoom.AddArrow(6*28, 3*32-16, Arrow.DIR_LEFT, 28, Color.white) ; + robot.InternalRoom.AddArrow(4*28+14, 4*32-16, Arrow.DIR_LEFT, 28, Color.white) ; + robot.InternalRoom.AddArrow(2*28+14, 5*32, Arrow.DIR_UP, 28, Color.white) ; + robot.InternalRoom.AddArrow(4*28+14, 10*32-16, Arrow.DIR_LEFT, 28, Color.white) ; + robot.InternalRoom.AddArrow(16*28+16, 10*32-16, Arrow.DIR_RIGHT, 28, Color.white) ; + robot.InternalRoom.AddArrow(18*28, 5*32+8, Arrow.DIR_UP, 28, Color.white) ; + robot.InternalRoom.AddArrow(16*28, 3*32-8, Arrow.DIR_RIGHT, 28, Color.white) ; + } + } + { // Room 7, Alternate Entry + Room room = (Room) rooms.elementAt(7); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(16,0,18,11,0); + room.AddTextBox("You can also enter the robot by moving the cursor so it overlaps the robot, and then pressing E.", + 2*28, 2*32, 350); + room.AddTextBox("Once inside, you can exit by pressing E again.", + 2*28, 6*32, 350); + } + { // Room 8, Periscope + Room room = (Room) rooms.elementAt(8); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(16,0,18,11,0); + room.AddTextBox("You can be inside the robot and still see outside.", + 2*28, 2*32, 350); + room.AddTextBox("Go inside the robot. Sit on the robot's EYE to activate its periscope.", + 2*28, 4*32, 350); + room.AddTextBox("Move off the eye to see inside the robot again.", + 2*28, 6*32, 350); + room.AddTextBox("Come outside.", + 2*28, 9*32, 350); + room.AddTextBox("Take the robot with you through the next few rooms.", + 2*28, 10*32, 350); + room.AddArrow(17*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 9, Triangle + Room room = (Room) rooms.elementAt(9); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(16,0,18,0,0); + room.SetMaterialFill(19,5,19,7,0); + room.AddTextBox("You can put things inside robots. You can even put robots inside robots!", + 2*28, 2*32, 400); + room.AddTextBox("Pick up the triangle. Carry it inside the robot. Drop it and come outside.", + 2*28, 9*32, 400); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new Triangle(9*28, 6*32, room, new Color(255,128,0))); + } + { // Room 10, Input + Room room = (Room) rooms.elementAt(10); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,0,3,3,1); + room.SetMaterialFill(0,5,19,8,0); + room.AddTextBox("This is an INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("Some robot parts connect to inputs. Go inside the robot and see.", + 5*28, 3*32, 400); + room.AddTextBox("When electricity flows IN to an input, it turns on the robot part.", + 2*28, 8*32, 500); + room.AddTextBox("You can see electricity flow. It is orange.", + 2*28, 10*32, 500); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + PortDevice pd=new PortDevice(2*28-8,24,room, 24, Port.TYPE_INPUT); + items.addElement(pd); + pd.rotate(1); pd.rotate(1); + } + { // Room 11, Output + Room room = (Room) rooms.elementAt(11); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,0,3,3,1); + room.SetMaterialFill(0,5,19,8,0); + room.AddTextBox("This is an OUTPUT.", + 5*28, 2*32, 400); + room.AddTextBox("Some robot parts connect to outputs. Go inside the robot and see.", + 5*28, 3*32, 400); + room.AddTextBox("When a robot part is activated, electricity flows OUT of its output.", + 2*28, 9*32, 500); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 32, Color.white) ; + PortDevice pd=new PortDevice(2*28-8,20,room, 24, Port.TYPE_OUTPUT); + items.addElement(pd); + pd.rotate(1); pd.rotate(1); + } + { // Room 12, Bumper + Room room = (Room) rooms.elementAt(12); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,5,0,8,0); + room.SetMaterialOutline(16,11,18,11,0); + room.AddTextBox("When a robot touches a wall, its bumper beeps and turns orange with electricity. Inside the robot, the bumper's OUTPUT turns on too.", + 2*28, 2*32, 450); + room.AddTextBox("Try it and see what happens.", + 2*28, 5*32, 450); + room.AddArrow(17*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 13, Thrusters + Room room = (Room) rooms.elementAt(13); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(16,0,18,0,0); + room.SetMaterialOutline(14,11,16,11,0); + room.AddTextBox("Inside a robot are four THRUSTERS.", + 2*28, 2*32, 350); + room.AddTextBox("You can propel robots by making electricity flow into the thrusters' INPUTS.", + 2*28, 4*32, 350); + room.AddTextBox("There is also a BATTERY inside the robot.", + 2*28, 7*32, 300); + room.AddTextBox("This robot can't move because its battery is dead.", + 2*28, 9*32, 300); + room.AddArrow(15*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 14, Crystal + Room room = (Room) rooms.elementAt(14); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(14,0,16,0,0); + room.SetMaterialOutline(19,4,19,6,0); + room.AddTextBox("Use this ENERGY CRYSTAL to recharge dead batteries.", + 2*28, 2*32, 250); + room.AddTextBox("Take it inside the robot. Pass it over the battery. Notice how the battery level fills with electricity.", + 2*28, 4*32+16, 350); + room.AddTextBox("The crystal goes dead (white) as its electricity drains.", + 2*28, 8*32, 500); + room.AddTextBox("Drop the crystal in the robot. Take the robot with you.", + 2*28, 10*32, 450); + room.AddArrow(559, 5*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new Crystal(12*28,2*32, room,100000)); + } + { // Room 15, Crystal Recharger + Room room = (Room) rooms.elementAt(15); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(16,11,18,11,0); + room.SetMaterialOutline(0,4,0,6,0); + room.SetMaterial(17,2,5); + room.AddTextBox("Use this CRYSTAL RECHARGER to recharge energy crystals.", + 2*28, 2*32, 350); + room.AddTextBox("Bring the dead energy crystal outside. Pass it over the recharger. Watch it fill with electricity.", + 2*28, 7*32, 400); + room.AddTextBox("Continue to take the robot with you.", + 2*28, 10*32, 350); + room.AddArrow(17*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 16, Thruster Demo + Room room = (Room) rooms.elementAt(16); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(16,0,18,11,0); + room.AddTextBox("START", + 13*28+14, 52, 350); + room.AddArrow(13*28, 32, Arrow.DIR_UP, 28, Color.white) ; + room.AddTextBox("Move the robot so ONLY its top bumper touches the top wall. Drop it.", + 4*28, 4*32, 350); + room.AddTextBox("When the robot touches a wall, electricity flows from its bumper to the thruster, propelling the robot.", + 4*28, 7*32, 350); + room.AddArrow(17*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 17, Thruster Talk + Room room = (Room) rooms.elementAt(17); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(16,0,18,11,0); + room.AddTextBox("A thruster moves a robot in the direction opposite its thrust.", + 2*28, 3*32, 400); + room.AddTextBox("When the left thruster is on, the robot moves RIGHT.", + 2*28, 5*32, 400); + room.AddTextBox("When the right thruster is on, the robot moves LEFT.", + 2*28, 7*32, 400); + room.AddTextBox("What happens when the top or bottom thruster is on?", + 2*28, 9*32, 400); + room.AddArrow(17*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 18, Switch + Room room = (Room) rooms.elementAt(18); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(16,0,18,0,0); + room.SetMaterialFill(0,5,0,7,0); + room.AddTextBox("The SWITCH inside a robot turns electricity flow to the thrusters on or off.", + 2*28, 2*32, 400); + room.AddTextBox("Go inside and sit on the switch. Press SPACEBAR to open and close it.", + 2*28, 5*32, 400); + room.AddTextBox("Thrusters work when the switch is closed (orange). Open the switch to save batteries.", + 2*28, 8*32, 450); + room.AddTextBox("Leave the robot here.", + 2*28, 11*32, 350); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 19, Antenna Input + Room room = (Room) rooms.elementAt(19); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,0,4,5,4); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(19,5,19,7,0); + room.AddTextBox("The ANTENNA control inside a robot controls the antenna outside.", + 6*28, 2*32, 400); + room.AddTextBox("When its INPUT is on, the robot's antenna sends signals to other robots, wherever they may be.", + 6*28, 5*32, 400); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + Antenna ant = new Antenna(2*28-12,2*32, room, Color.white); + PortDevice pd = new PortDevice(18, 4*32, room, 28, Port.TYPE_OUTPUT); + items.addElement(ant); + items.addElement(pd); + pd.value=true; + pd.rotate(1); + Wire dummy = new Wire(pd.ports[0], ant.ports[0]); + } + { // Room 20, Antenna Output + Room room = (Room) rooms.elementAt(20); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,0,4,4,4); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("When a robot's antenna receives signals, the antenna control's OUTPUT turns on.", + 6*28, 2*32, 350); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + items.addElement(new Antenna(2*28-12, 2*32, room, Color.white)); + } + { // Room 21, Grabber Input + Room room = (Room) rooms.elementAt(21); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,0,4,5,4); + room.SetMaterialOutline(16,11,18,11,0); + room.SetMaterialOutline(19,5,19,7,0); + room.AddTextBox("The GRABBER control inside a robot controls the grabber outside the robot.", + 6*28, 2*32, 350); + room.AddTextBox("When the grabber control's INPUT is on, the robot will grab an object that touches the robot's body.", + 6*28, 4*32, 350); + room.AddTextBox("Note: Robots can't grab objects held by you or another robot.", + 3*28, 9*32, 400); + room.AddArrow(17*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + room.graphix.addElement(new Graphix("grab0.jpg",28,48)); + } + { // Room 22, Grabber Output + Room room = (Room) rooms.elementAt(22); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,0,4,5,4); + room.SetMaterialOutline(16,0,18,0,0); + room.SetMaterialOutline(19,5,19,7,0); + room.AddTextBox("When a robot grabs a object, the grabber control's OUTPUT turns on.", + 6*28, 2*32, 300); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + room.graphix.addElement(new Graphix("grab1.jpg",28,56)); + } + { // Room 23, Sensors + Room room = (Room) rooms.elementAt(23); + room.SetMaterialOutline(0,0,19,4,6); + room.SetMaterialOutline(0,8,19,11,6); + room.SetMaterialOutline(1,8,18,8,0); + room.AddTextBox("These are SENSORS. Use them inside robots to detect objects that MATCH the sensor shape. Each of these sensors detects energy crystals in a different way.", + 2*28, 8*32, 500); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new DirectionalSensor(3*28+14,1*32+4, room,new Crystal(0,0,null,0))); + items.addElement(new RoomSensor(10*28,2*32, room,new Crystal(0,0,null,0))); + items.addElement(new ContactSensor(16*28,2*32, room,new Crystal(0,0,null,0))); + } + { // Room 24, Contact Sensor + Room room = (Room) rooms.elementAt(24); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,5,19,7,0); + room.AddTextBox("This is a CONTACT sensor. It detects objects that touch it.", + 2*28, 2*32, 400); + room.AddTextBox("Inside the robot, it detects objects that touch the robot's body.", + 2*28, 4*32, 500); + room.AddTextBox("Place the square ON the sensor. What happens when you let go?", + 2*28, 9*32, 500); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new ContactSensor(16*28,2*32,room,new Square(0,0,null,Color.white))); + items.addElement(new Square(10*28,6*32,room,Color.blue)); + } + { // Room 25, Room Sensor + Room room = (Room) rooms.elementAt(25); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(1,11,3,11,0); + room.AddTextBox("This is an IN-SAME-ROOM sensor. It detects objects in the same room.", + 2*28, 2*32, 400); + room.AddTextBox("Inside the robot, it detects objects in the same room as the robot.", + 2*28, 4*32, 500); + room.AddTextBox("Sensors can't detect an object that is held. Pick up the triangle. What happens?", + 6*28, 9*32, 400); + room.AddArrow(2*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + items.addElement(new Triangle(10*28,6*32,room,new Color(255,128,0))); + items.addElement(new RoomSensor(15*28,2*32,room,new Triangle(0,0,null,Color.white))); + } + { // Room 26, Directional Sensor + Room room = (Room) rooms.elementAt(26); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,4,0,6,0); + room.SetMaterialOutline(1,0,3,0,0); + room.AddTextBox("This is a DIRECTIONAL sensor. It detects the direction of an object in the same room.", + 4*28, 2*32, 450); + room.AddTextBox("Inside the robot, it detects the direction of an object in the robot's room.", + 4*28, 4*32, 450); + room.AddTextBox("Pick up the sensor. move it around the crystal. Outputs pointing in the DIRECTION of the crystal turn on.", + 2*28, 9*32, 500); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + items.addElement(new Crystal(10*28,6*32,room,100000)); + items.addElement(new DirectionalSensor(14*28,5*32, room, new Crystal(0,0,null,0))); + } + { // Room 27, Orange Robot Talk + Room room = (Room) rooms.elementAt(27); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(19,4,19,6,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("Next door is a robot wired with three sensors.", + 2*28, 2*32, 400); + room.AddTextBox("The sensors are wired to make the robot:", + 2*28, 4*32, 400); + room.AddTextBox("- beep when it contacts a square.", + 4*28, 6*32, 400); + room.AddTextBox("- move left or right toward an energy crystal.", + 4*28, 8*32, 400); + room.AddTextBox("- move down when a triangle is in the room", + 4*28, 10*32, 400); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 28, Orange Robot + Room room = (Room) rooms.elementAt(28); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(1,11,2,11,0); + room.AddTextBox("Go inside the robot. Notice how the sensors are wired.", + 2*28, 2*32, 500); + room.AddTextBox("Come outside. Move the objects and the robot to new locations. Watch what happens.", + 2*28, 4*32, 500); + room.AddArrow(2*28+14, 383, Arrow.DIR_DOWN, 28, Color.white) ; + items.addElement(new Square(4*28,6*32, room,Color.blue)); + items.addElement(new Crystal(9*28,6*32, room,100000)); + items.addElement(new Triangle(14*28, 6*32, room,new Color(255,128,0))); + GenericRobot robot = new OrangeRobot(2*28, 2*32, room); + items.addElement(robot); + { + robot.thrusterPower=true; + items.addElement(new DirectionalSensor(7*28+14,5*32+4,robot.InternalRoom,new Crystal(0,0,null,0))); + Item dsensor = (Item) items.lastElement(); + Wire dummy; + dummy = new Wire(((GenericRobot)robot).devices[1].ports[0], + ((Device)dsensor).ports[3]); + dummy = new Wire(((GenericRobot)robot).devices[3].ports[0], + ((Device)dsensor).ports[1]); + + items.addElement(new RoomSensor(8*28,2*32,robot.InternalRoom,new Triangle(0,0,null,Color.white))); + Item rsensor = (Item) items.lastElement(); + ((Device)rsensor).rotate(1); + ((Device)rsensor).rotate(1); + dummy = new Wire(((Device)rsensor).ports[0], + ((GenericRobot)robot).devices[0].ports[0]); + + items.addElement(new ContactSensor(13*28,2*32,robot.InternalRoom,new Square(0,0,null,Color.white))); + Item csensor = (Item) items.lastElement(); + dummy = new Wire(((GenericRobot)robot).devices[8].ports[0], + ((Device)csensor).ports[0]); + } + } + { // Room 29, White Robot Talk + Room room = (Room) rooms.elementAt(29); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(1,0,2,0,0); + room.AddTextBox("The robot next door is wired to pick up and carry an object.", + 4*28, 2*32, 400); + room.AddTextBox("The robot is also wired to follow walls.", + 4*28, 4*32, 400); + room.AddTextBox("Go inside the robot. Close the switch. Move quickly onto the eye and watch how the robot works.", + 4*28, 6*32, 400); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 30, White Robot Maze + Room room = (Room) rooms.elementAt(30); + int[][] table = { + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,4}, + {4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4}, + {4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4}, + {4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,4,0,0,0,4}, + {4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,4,0,0,0,4}, + {0,0,0,0,4,0,0,0,4,4,4,4,4,4,4,4,0,0,0,4}, + {0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,4,4,0,4,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table; + items.addElement(new Crystal(12*28,6*32,room,100000)); + items.addElement(new WhiteRobot(1*28, 6*32, room)); + { + Item robot = (Item) items.lastElement(); + Wire dummy; + dummy = new Wire(((GenericRobot)robot).devices[1].ports[0], + ((GenericRobot)robot).devices[6].ports[0]); + dummy = new Wire(((GenericRobot)robot).devices[5].ports[0], + ((GenericRobot)robot).devices[0].ports[0]); + dummy = new Wire(((GenericRobot)robot).devices[7].ports[0], + ((GenericRobot)robot).devices[2].ports[0]); + dummy = new Wire(((GenericRobot)robot).devices[3].ports[0], + ((GenericRobot)robot).devices[4].ports[0]); + + items.addElement(new ContactSensor(8*28,2*32,robot.InternalRoom,new Triangle(0,0,null,Color.white))); + Item csensor = (Item) items.lastElement(); + + items.addElement(new NOTGate(10*28,5*32,robot.InternalRoom)); + Item notgate = (Item) items.lastElement(); + ((Device)notgate).rotate(1); + ((Device)notgate).rotate(1); + dummy = new Wire(((Device)csensor).ports[0], + ((Device)notgate).ports[0]); + dummy = new Wire(((Device)notgate).ports[1], + ((GenericRobot)robot).devices[9].ports[0]); + } + } + { // Room 31, After Maze + Room room = (Room) rooms.elementAt(31); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(19,4,19,6,0); + room.SetMaterial(3,0,0); + room.SetMaterial(5,0,0); + room.AddTextBox("Drop a triangle on the robot above to make it let go of the crystal. Look inside to see why it works.", + 2*28, 8*32, 500); + room.AddArrow(559, 5*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new Triangle(14*28, 6*32, room, new Color(255,128,0))); + } + { // Room 32, End + Room room = (Room) rooms.elementAt(32); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,4,0,6,0); + room.SetMaterial(19,10,0); + room.SetMaterial(5,5,8); + room.SetMaterial(5,7,9); + room.AddTextBox("You have learned a lot about ROBOT ANATOMY.", + 2*28, 2*32, 500); + room.AddTextBox("Go to TOOLKIT tutorial.", + 6*28, 6*32, 500); + room.AddTextBox("Return to MAIN MENU.", + 6*28, 8*32, 500); + room.AddTextBox("Press ? for help or hints.", + 2*28, 10*32, 500); + } + { // Room 33, Shortcut + Room room = (Room) rooms.elementAt(33); + room.SetMaterialOutline(0,0,19,9,1); + room.SetMaterialOutline(0,11,19,11,1); + room.AddTextBox("Aha! A shortcut between the beginning and end of ROBOT ANATOMY!", + 4*28, 4*32, 400); + room.AddTextBox("or", + 10*28, 10*32+20, 500); + room.AddArrow(8*28, 10*32+16, Arrow.DIR_LEFT, 50, Color.white) ; + room.AddArrow(13*28, 10*32+16, Arrow.DIR_RIGHT, 50, Color.white) ; + } + + int[] list1 = {31,32,33,1,2,3,4,5}; + LinkRoomsHorizontally(list1); + + int[] list2 = {5,6,7,8,9}; + LinkRoomsVertically(list2); + + int[] list3 = {9,10,11,12}; + LinkRoomsHorizontally(list3); + + int[] list4 = {12,13,14}; + LinkRoomsVertically(list4); + + LinkRoomsLeftRight(14,15); + + int[] list5 = {15,16,17,18}; + LinkRoomsVertically(list5); + + int[] list6 = {21,20,19,18}; + LinkRoomsHorizontally(list6); + + LinkRoomsUpDown(21,22); + + int[] list7 = {22,23,24,25}; + LinkRoomsHorizontally(list7); + + LinkRoomsUpDown(25,26); + + int[] list8 = {28,27,26}; + LinkRoomsHorizontally(list8); + + LinkRoomsUpDown(28,29); + LinkRoomsLeftRight(29,30); + LinkRoomsUpDown(30,31); + + gameCursor = new GameCursor(16*28+14,5*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + items.addElement(gameCursor); + items.addElement(helpCam); + + player = gameCursor; + currentViewer = player; + electricity=true; + } + +} diff --git a/src/com/droidquest/levels/ROTut2.java b/src/com/droidquest/levels/ROTut2.java new file mode 100644 index 0000000..26e57cf --- /dev/null +++ b/src/com/droidquest/levels/ROTut2.java @@ -0,0 +1,1273 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.LabCursor; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.ANDGate; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.NOTGate; +import com.droidquest.devices.Node; +import com.droidquest.devices.ORGate; +import com.droidquest.devices.PortDevice; +import com.droidquest.devices.RoomSensor; +import com.droidquest.devices.Thruster; +import com.droidquest.devices.XORGate; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Button; +import com.droidquest.items.Crystal; +import com.droidquest.items.Key; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.SentryT2; +import com.droidquest.items.ToolBox; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class ROTut2 extends Level +{ + +public ROTut2(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 2, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 3, Light Blue Wall + materials.addElement(new Material(new Color(190,190,255),false,true)); + // Material 4, Dark Blue Wall + materials.addElement(new Material(new Color(0,0,128),false, true)); + // Material 5, Recharger + materials.addElement(new CrystalRecharger()); + // Material 6, Portal to Tutorial 3; + materials.addElement(new Portal("ROTut3.lvl",false, true)); + // Material 7, Portal to Main Menu; + materials.addElement(new Portal("MainMenu.lvl",false, true)); + + for (int a=0; a<42; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("Special Keys",6*28, 2*32, 500); + room.AddTextBox("R Become the Remote Control. SPACEBAR toggles on/off.", + 2*28, 3*32, 500); + room.AddTextBox("S Become the Solderpen. SPACEBAR toggles on/off.", + 2*28, 5*32, 500); + room.AddTextBox("C Become the Cursor. SPACEBAR toggles on/off.", + 2*28, 7*32, 500); + room.AddTextBox("T Summons Toolkit to your room. Open/close Toolkit in room.", + 2*28, 9*32, 500); + room.AddTextBox("To continue, press RETURN.", 4*28, 11*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + int[][] table = { + {2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("{BIG} TOOLKIT", 6*28, 2*32, 500); + room.AddTextBox("Here you will learn to use the", + 2*28, 3*32, 500); + room.AddTextBox("- Remote Control", 6*28, 5*32, 500); + room.AddTextBox("- Solderpen", 6*28, 6*32, 500); + room.AddTextBox("- Toolkit", 6*28, 7*32, 500); + room.AddTextBox("If you don't know about ROBOT ANATOMY, return to the Main Menu by using the menubar.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Remote + Room room = (Room) rooms.elementAt(2); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("This is the REMOTE CONTROL. It 'freezes' the flow of electricity.", + 2*28, 2*32, 400); + room.AddTextBox("Press R to become the Remote Control.", + 2*28, 6*32, 300); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + Remote remote = new Remote(); + remote.x = 17*28+14; remote.y = 48; remote.room = room; + items.addElement(remote); + } + { // Room 3, Freeze Electricity + Room room = (Room) rooms.elementAt(3); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Press SPACEBAR to 'freeze' the electricity. The Remote Control turns white.", + 2*28, 2*32, 500); + room.AddTextBox("Press SPACEBAR again to let electricity flow. The Remote Control turns orange.", + 2*28, 10*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + Node node = new Node(10*28,4*32,room, Node.TYPE_STRAIGHT); + NOTGate notgate = new NOTGate(15*28, 6*32, room); + items.addElement(node); + items.addElement(notgate); + Wire wire = new Wire(node.ports[0], notgate.ports[1]); + wire = new Wire(notgate.ports[0], node.ports[2]); + } + { // Room 4, Freeze Robot + Room room = (Room) rooms.elementAt(4); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3} + }; + room.RoomArray = table; + room.AddTextBox("Freeze the electricity to stop the robot.", + 9*28, 2*32, 300); + room.AddTextBox("Turn on the elec- tricity and the robot moves.", + 9*28, 5*32, 300); + room.AddTextBox("When the Remote Control is on, it drains electricity from the Robot's battery.", + 9*28, 8*32, 300); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new Crystal(3*28, 10*32, room, 100000)); + OrangeRobot robot = new OrangeRobot(28,32,room); + items.addElement(robot); + RoomSensor sensor = new RoomSensor(6*28, 6*32, robot.InternalRoom, + new Crystal(0,0,null,0)); + items.addElement(sensor); + sensor.rotate(1); sensor.rotate(1); + Wire wire = new Wire(sensor.ports[0], robot.devices[8].ports[0]); + wire = new Wire(robot.devices[5].ports[0], robot.devices[2].ports[0]); + wire = new Wire(robot.devices[3].ports[0], robot.devices[6].ports[0]); + wire = new Wire(robot.devices[7].ports[0], robot.devices[0].ports[0]); + wire = new Wire(robot.devices[1].ports[0], robot.devices[4].ports[0]); + robot.thrusterPower=true; + } + { // Room 5, Freeze Sensors + Room room = (Room) rooms.elementAt(5); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Freeze the electricity again. Press C to become the cursor. Pick up the sensor and move it around the crystal.", + 2*28, 2*32, 450); + room.AddTextBox("Did the outputs change color?", + 2*28, 5*32, 200); + room.AddTextBox("Sensors don't work when the remote control is off.", + 2*28, 8*32, 350); + room.AddTextBox("Turn the remote contol on.", + 2*28, 11*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new Crystal(12*28, 4*32, room, 100000)); + items.addElement(new DirectionalSensor(15*28, 6*32, room, + new Crystal(0,0,null,0))); + } + { // Room 6, Solderpen + Room room = (Room) rooms.elementAt(6); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,3} + }; + room.RoomArray = table; + room.AddTextBox("The SOLDERPEN is used to wire OUTPUTS to INPUTS.", + 2*28, 2*32, 350); + room.AddTextBox("Press S to become the Solderpen.", + 2*28, 5*32, 400); + room.AddTextBox("Tip", + 14*28+8, 3*32-12, 50); + room.AddArrow(16*28+24, 2*32+14, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white); + SolderingPen sp = new SolderingPen(); + items.addElement(sp); + sp.x = 17*28; sp.y=2*32-8; sp.room = room; + } + { // Room 7, Attach wires + Room room = (Room) rooms.elementAt(7); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0} + }; + room.RoomArray = table; + room.AddTextBox("Move the Solderpen to the INPUT (circle) until the Solderpen tip glows orange. Press SPACEBAR.", + 2*28, 2*32, 400); + room.AddTextBox("Move the Solderpen to the OUTPUT (arrow). When the tip glows orange, press SPACEBAR. The INPUT is now wired to the OUTPUT and electricity flows between them.", + 2*28, 7*32, 400); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white); + items.addElement(new Thruster(17*28, 9*32, room, Port.ROT_RIGHT, Color.white)); + PortDevice pd = new PortDevice(15*28, 10*32, room, 28, Port.TYPE_OUTPUT); + pd.value=true; + items.addElement(pd); + } + { // Room 8, Detatch wires + Room room = (Room) rooms.elementAt(8); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0} + }; + room.RoomArray = table; + room.AddTextBox("To disconnect the wire, move near the INPUT or OUTPUT. Press the SPACEBAR when the tip glows green.", + 2*28, 2*32, 400); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white); + Thruster thruster = new Thruster(17*28, 9*32, room, Port.ROT_RIGHT, Color.white); + items.addElement(thruster); + PortDevice pd = new PortDevice(15*28, 10*32, room, 28, Port.TYPE_OUTPUT); + pd.value=true; + items.addElement(pd); + Wire wire = new Wire(thruster.ports[0], pd.ports[0]); + } + { // Room 9, Stretch Wires + Room room = (Room) rooms.elementAt(9); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("When you connect inputs to outputs, you create CIRCUITS.", + 2*28, 2*32, 500); + room.AddTextBox("Change to the cursor and pick up part of this circuit.", + 2*28, 4*32, 500); + room.AddTextBox("The wire will stretch as you move, but break if you leave the room.", + 2*28, 6*32, 500); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white); + NOTGate ng = new NOTGate(15*28, 7*32, room); + ORGate og = new ORGate(10*28, 7*32, room); + og.rotate(1); og.rotate(1); + items.addElement(ng); + items.addElement(og); + Wire wire = new Wire(ng.ports[1], og.ports[0]); + wire = new Wire(og.ports[2], ng.ports[0]); + } + { // Room 10, Stretch Wires + Room room = (Room) rooms.elementAt(10); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Practice wiring circuits in the orange robot above. (Don't forget to come back!)", + 2*28, 2*32, 400); + room.AddTextBox("Go inside the robot and rewire the bumpers to the thrusters in any way you like.", + 2*28, 5*32, 400); + room.AddTextBox("To start the robot moving, put it against a wall.", + 2*28, 8*32, 400); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 11, Toolkit is here + Room room = (Room) rooms.elementAt(11); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("This is the TOOLKIT. Inside are parts you need to wire circuits.", + 2*28, 2*32, 400); + room.AddTextBox("Press C to become the cursor and pick up the Toolkit.", + 2*28, 5*32, 400); + room.AddTextBox("Carry it into the next room.", + 2*28, 8*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + toolbox = new ToolBox(15*28, 2*32, room); + items.addElement(toolbox); + } + { // Room 12, Open and Close Toolkit + Room room = (Room) rooms.elementAt(12); + int[][] table = { + {3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Drop Toolkit here.", + 4*28, 4*32, 100); + room.AddTextBox("You can open and close the Toolkit by pressing T. Try it a few times.", + 2*28, 7*32, 300); + room.AddTextBox("Leave the Toolkit here.", + 2*28, 10*32, 400); + room.AddArrow(9*28, 5*32, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 13, Toolkit Sentry + Room room = (Room) rooms.elementAt(13); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3}, + {3,0,0,3,3,0,0,3,3,0,0,3,3,3,3,3,3,0,0,0}, + {3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,0}, + {3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,0}, + {3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,0}, + {0,0,0,3,3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,3}, + {0,0,0,3,3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,3}, + {0,0,0,3,3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("NO TOOLKITS ALLOWED!", + 2*28, 2*32, 150); + room.AddArrow(559, 6*32, Arrow.DIR_RIGHT, 28, Color.white); + items.add(new SentryT2(2*28, 2*32, room)); + } + { // Room 14, Summon Toolkit + Room room = (Room) rooms.elementAt(14); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Do you want the Toolkit? Press T to summon it. Drop the Toolkit and press T to open and close it.", + 2*28, 2*32, 500); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 15, Objects in Toolkit + Room room = (Room) rooms.elementAt(15); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("You can take parts in and out of the Toolkit with the cursor.", + 2*28, 2*32, 500); + room.AddTextBox("To take a part out, move on top of it and press the SPACEBAR. To put it back, drop it anywhere in the Toolkit.", + 2*28, 5*32, 500); + room.AddTextBox("Open Toolkit here.", + 3*28, 9*32, 100); + room.AddArrow(7*28, 10*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 16, Rotating Objects + Room room = (Room) rooms.elementAt(16); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("You can rotate parts left and right by holding a part and pressing the [ and ] keys.", + 2*28, 2*32, 450); + room.AddTextBox("There is no limit to the number of parts you can take out of the Toolkit.", + 2*28, 5*32, 450); + room.AddTextBox("Open Toolkit here.", + 3*28, 9*32, 100); + room.AddArrow(7*28, 10*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 17, Hot Cursor + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("You can make the cursor HOT with elctricity. Press H.", + 6*28, 2*32, 300); + room.AddTextBox("Pass the hot cursor over the antenna INPUT to turn the antenna on.", + 6*28, 5*32, 300); + room.AddTextBox("Press H again to make the cursor cold.", + 6*28, 8*32, 300); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + } + { // Room 18 Crossroads + Room room = (Room) rooms.elementAt(18); + int[][] table = { + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,4,4,4,4,4,4,4,0,0,0,0,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table; + room.AddTextBox("{BIG} CROSSROADS", + 3*28, 4*32, 500); + room.AddTextBox("(Turn the Remote Control on.)", + 4*28, 5*32, 250); + room.AddTextBox("NODES", + 2*28, 32+16, 300); + room.AddTextBox("FLIPFLOPS", + 15*28, 32+16, 300); + room.AddTextBox("LOGIC GATES", + 16*28, 6*32, 100); + room.AddTextBox("When you have learned all about the Toolkit, go this way.", + 4*28, 9*32, 300); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(17*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(559, 6*32, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(10*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 19, Paths to Nodes & FlipFlops + Room room = (Room) rooms.elementAt(19); + int[][] table = { + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4}, + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4} + }; + room.RoomArray = table; + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 20, Nodes Intro + Room room = (Room) rooms.elementAt(20); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Nodes make electricity branch to two or three places.", + 2*28, 2*32, 350); + room.AddTextBox("Take a node from the Toolkit and carry it to the next room.", + 2*28, 9*32, 500); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white); + items.addElement(new Node(13*28, 32+16, room, Node.TYPE_STRAIGHT)); + items.addElement(new Node(15*28, 32+16, room, Node.TYPE_RIGHT)); + items.addElement(new Node(17*28, 32+16, room, Node.TYPE_THREE)); + } + { // Room 21, Nodes Workshop + Room room = (Room) rooms.elementAt(21); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Wire the INPUT (circle) of the node to the OUTPUT of the CONTACT sensor. Wire the node outputs to the thrusters.", + 2*28, 2*32, 275); + room.AddTextBox("Drop the blue key so that it touches the sensor. Electricity flows to both thrusters.", + 2*28, 9*32, 500); + items.addElement(new Key(11*28, 2*32, room, Color.white)); + items.addElement(new ContactSensor(11*28, 4*32, room, new Key(0,0,null, Color.white))); + items.addElement(new Thruster(15*28, 32+16, room, Port.ROT_UP, Color.white)); + items.addElement(new Thruster(16*28, 3*32, room, Port.ROT_RIGHT, Color.white)); + } + { // Room 22, Flipflop intro + Room room = (Room) rooms.elementAt(22); + int[][] table = { + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("A flipflop is like a light switch. It 'flips' electricity from one output to the other.", + 5*28, 2*32, 300); + room.AddTextBox("Take a flipflop from the Toolkit. Put the hot cursor on one input at a time to make the electricity 'flip' or 'flop'.", + 5*28, 6*32, 300); + items.addElement(new FlipFlop(17*28+7, 32+16, room)); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 23, Flipflop workshop + Room room = (Room) rooms.elementAt(23); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Go inside the robot and wire the orange OUTPUT of the flipflop to the thruster on the right. Sit on the eye to see what you did.", + 5*28, 8*32, 420); + BlueRobot robot = new BlueRobot(9*28,4*32,room); + items.addElement(robot); + FlipFlop ff = new FlipFlop(10*28, 5*32, robot.InternalRoom); + items.addElement(ff); + Wire wire = new Wire(ff.ports[0], robot.devices[7].ports[0]); + wire = new Wire(ff.ports[2], robot.devices[3].ports[0]); + wire = new Wire(robot.devices[5].ports[0], ff.ports[1]); + robot.thrusterPower=true; + } + { // Room 24, Crossroads II + Room room = (Room) rooms.elementAt(24); + int[][] table = { + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table; + room.AddTextBox("Crossroads", + 2*28, 6*32+8, 500); + room.AddTextBox("NOT-gate", + 2*28, 32+16, 500); + room.AddTextBox("AND-gate", + 15*28, 2*32+16, 500); + room.AddTextBox("XOR-gate", + 15*28, 10*32, 500); + room.AddTextBox("OR-gate", + 2*28, 10*32+16, 500); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(559, 2*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + room.AddArrow(0, 6*32, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 25, NOT gate intro + Room room = (Room) rooms.elementAt(25); + int[][] table = { + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("A NOT-gate inverts electricity flow. It turns on when its INPUT is NOT on.", + 5*28, 2*32, 300); + room.AddTextBox("Take a NOT-gate from the Toolkit and use the hot cursor to see how it works.", + 5*28, 6*32, 400); + items.addElement(new NOTGate(17*28+10, 32+12, room)); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 26, NOT gate workshop + Room room = (Room) rooms.elementAt(26); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Wire the NOT-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when the crystal is NOT touching the CONTACT sensor.", + 5*28, 8*32, 400); + items.addElement(new Crystal(3*28, 7*32, room, 100000)); + ContactSensor sensor = new ContactSensor(2*28, 6*32, room, new Crystal(0,0,null,0)); + items.addElement(sensor); + NOTGate ng = new NOTGate(4*28, 4*32, room); + items.addElement(ng); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor.ports[0], ng.ports[0]); + } + { // Room 27, OR gate intro + Room room = (Room) rooms.elementAt(27); + int[][] table = { + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,2} + }; + room.RoomArray = table; + room.AddTextBox("An OR-gate turns on when one OR the other INPUT is on, or both.", + 5*28, 2*32, 300); + room.AddTextBox("Take an OR-gate from the Toolkit and use the hot cursor to see how it works.", + 2*28, 8*32, 400); + items.addElement(new ORGate(17*28+10, 32+12, room)); + room.AddArrow(17*28, 0, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 28, OR workshop + Room room = (Room) rooms.elementAt(28); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Wire the OR-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when the key is above OR left of the sensor.", + 5*28, 10*32, 400); + items.addElement(new Key(3*28, 7*32, room, Color.blue)); + DirectionalSensor sensor = new DirectionalSensor(8*28, 6*32, room, + new Key(0,0,null,Color.white)); + items.addElement(sensor); + ORGate og = new ORGate(4*28, 4*32, room); + items.addElement(og); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor.ports[0], og.ports[1]); + wire = new Wire(sensor.ports[3], og.ports[0]); + } + { // Room 29, Paths to AND & XOR + Room room = (Room) rooms.elementAt(29); + int[][] table = { + {4,4,4,4,4,4,4,0,0,0,0,4,4,4,4,4,4,4,4,4}, + {0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4}, + {0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4}, + {0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,4,4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table; + room.AddArrow(9*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(5*28, 0, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 30, AND gate intro + Room room = (Room) rooms.elementAt(30); + int[][] table = { + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("An AND-gate turns on when its left AND right INPUTS are on.", + 5*28, 2*32, 300); + room.AddTextBox("Take a AND-gate from the Toolkit and test it with the hot cursor.", + 5*28, 6*32, 400); + items.addElement(new ANDGate(17*28+10, 32+12, room)); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 31, AND gate workshop + Room room = (Room) rooms.elementAt(31); + int[][] table3 = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table3; + room.AddTextBox("Wire the AND-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when the key is left AND up from this DIRECTIONAL sensor.", + 5*28, 9*32, 400); + items.addElement(new Key(3*28, 7*32, room, Color.blue)); + DirectionalSensor sensor = new DirectionalSensor(5*28, 6*32, room, + new Key(0,0,null,Color.white)); + items.addElement(sensor); + ANDGate ag = new ANDGate(4*28, 4*32, room); + items.addElement(ag); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor.ports[0], ag.ports[1]); + wire = new Wire(sensor.ports[3], ag.ports[0]); + } + { // Room 32, XOR gate intro + Room room = (Room) rooms.elementAt(32); + int[][] table = { + {2,2,2,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,2} + }; + room.RoomArray = table; + room.AddTextBox("An EXCLUSIVE-OR- gate (XOR-gate) turns on when one OR the other INPUT is on, NOT both.", + 7*28, 2*32, 250); + room.AddTextBox("Take an XOR-gate from the Toolkit and test it with the hot cursor.", + 2*28, 9*32, 400); + items.addElement(new XORGate(17*28+10, 32+12, room)); + room.AddArrow(17*28, 0, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 33, XOR workshop + Room room = (Room) rooms.elementAt(33); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Wire the XOR-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when either the key or the crystal is in the room, but not both.", + 5*28, 9*32, 400); + items.addElement(new Key(2*28, 9*32, room, Color.blue)); + items.addElement(new Crystal(2*28, 7*32, room, 100000)); + RoomSensor sensor1 = new RoomSensor(8*28, 6*32, room, new Key(0,0,null,Color.white)); + RoomSensor sensor2 = new RoomSensor(8*28, 7*32, room, new Crystal(0,0,null,0)); + sensor1.rotate(1); sensor1.rotate(1); + sensor2.rotate(1); sensor2.rotate(1); + items.addElement(sensor1); + items.addElement(sensor2); + XORGate xg = new XORGate(4*28, 4*32, room); + items.addElement(xg); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor1.ports[0], xg.ports[1]); + wire = new Wire(sensor2.ports[0], xg.ports[0]); + } + { // Room 34, Circuit Ideas I + Room room = (Room) rooms.elementAt(34); + int[][] table = { + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Try these robot circuits in the robot below.", + 2*28, 2*32, 500); + room.AddTextBox("LEFT WALL CRAWLER", + 3*28, 4*32, 500); + room.AddTextBox("Rewire the NOT gate to the thruster on the right.", + 4*28, 4*32+16, 400); + room.AddTextBox("PING-PONG", + 3*28, 7*32, 500); + room.AddTextBox("Unwire the NOT-gate. Use a second flipflop wired the same way as the robot in the flipflop example above.", + 4*28, 7*32+16, 400); + room.AddTextBox("MORE CIRCUIT IDEAS", + 0, 9*32, 100); + room.AddTextBox("ROBOT", + 9*28, 11*32, 400); + room.AddArrow(10*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 35, Circuit Ideas II + Room room = (Room) rooms.elementAt(35); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("KEY-PHOBE", + 2*28, 2*32, 450); + room.AddTextBox("Wire a key DIRECTIONAL sensor's outputs to the thrusters they point toward.", + 3*28, 2*32+16, 450); + room.AddTextBox("NON-KEY-GRABBER", + 2*28, 5*32, 450); + room.AddTextBox("Wire a key CONTACT sensor to a NOT-gate. Wire the NOT-gate to the grabber input.", + 3*28, 5*32+16, 450); + room.AddTextBox("CRYSTAL-SIGNALER", + 2*28, 8*32, 450); + room.AddTextBox("Wire the crystal IN-SAME-ROOM sensor to the antenna.", + 3*28, 8*32+16, 450); + } + { // Room 36, Robot Play area 1 + Room room = (Room) rooms.elementAt(36); + int[][] table = { + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,0,0,0,0,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + WhiteRobot robot = new WhiteRobot(0,6*32,room); + items.addElement(robot); + NOTGate ng = new NOTGate(3*28,5*32,robot.InternalRoom); + items.addElement(ng); + ng.rotate(1); ng.rotate(1); + FlipFlop ff = new FlipFlop(10*28, 4*32, robot.InternalRoom); + items.addElement(ff); + Wire wire = new Wire(robot.devices[3].ports[0], ng.ports[1]); + wire = new Wire(robot.devices[6].ports[0], ff.ports[0]); + wire = new Wire(ff.ports[1], robot.devices[4].ports[0]); + wire = new Wire(ff.ports[2], robot.devices[2].ports[0]); + wire = new Wire(ff.ports[3], robot.devices[0].ports[0]); + ContactSensor sensor = new ContactSensor(15*28, 6*32, robot.InternalRoom, + new Button(0,0,null,Color.white)); + items.addElement(sensor); + robot.thrusterPower=true; + items.addElement(new Key(2*28, 9*32, room, Color.blue)); + items.addElement(new Crystal(4*28, 9*32, room, 100000)); + } + { // Room 37, Robot Play area 2 + Room room = (Room) rooms.elementAt(37); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,3}, + {3,0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0}, + {3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0}, + {3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0}, + {3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0}, + {3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0}, + {3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0}, + {3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + items.addElement(new Button(16*28, 32+16, room, new Color(255,128,0))); + } + { // Room 38, Robot Play area 3 + Room room = (Room) rooms.elementAt(38); + int[][] table = { + {3,3,3,3,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,3,0,0,0,3,3,3,3,3,3,3,0,0,0,3}, + {3,0,0,0,0,3,0,0,0,3,0,0,0,0,0,3,0,0,0,3}, + {3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,0,0,0,3}, + {3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,0,0,0,3}, + {3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + items.addElement(new Button(12*28, 5*32, room, new Color(0,0,255))); + } + { // Room 39, End + Room room = (Room) rooms.elementAt(39); + int[][] table = { + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Now you know how to use the Solderpen, Remote Control, and Toolkit.", + 2*28, 2*32, 500); + room.AddTextBox("You also know how nodes, flipflops, and logic gates work.", + 2*28, 3*32+16, 500); + room.AddTextBox("You can use these to design and build robots in ROBOTROPOLIS and the INNOVATION LAB.", + 2*28, 6*32, 500); + room.AddTextBox("Go to CHIP DESIGN.", + 6*28, 9*32, 500); + room.AddTextBox("Return to MAIN MENU.", + 6*28, 11*32, 500); + } + { // Room 40, Wire Flipping + Room room = (Room) rooms.elementAt(40); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("Wires are normally drawn as a horizontal line and a vertical line attached to the 1st and 2nd ports. But these can be 'flipped' without having to remove the wire.", + 2*28, 2*32, 500); + room.AddTextBox("Become the Soldering Pen and move the tip over any wired port until the tip turns green and then press F.", + 2*28, 6*32, 500); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + NOTGate ng1 = new NOTGate(6*28, 10*32, room); + items.addElement(ng1); + ng1.rotate(1); + NOTGate ng2 = new NOTGate(12*28, 8*32, room); + items.addElement(ng2); + Wire wire = new Wire(ng1.ports[1], ng2.ports[0]); + } + { // Room 41, Gate Flipping + Room room = (Room) rooms.elementAt(41); + int[][] table = { + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("AND, OR, XOR, and FlipFlops can also be flipped so their inputs (and outputs) can switch connections without having to rewire them.", + 2*28, 2*32, 500); + room.AddTextBox("Become the cursor and pick up a gate, and then press F.", + 2*28, 5*32, 500); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + NOTGate ng1 = new NOTGate(4*28, 10*32, room); + ng1.rotate(1); + items.addElement(ng1); + NOTGate ng2 = new NOTGate(8*28, 10*32, room); + ng2.rotate(-1); + items.addElement(ng2); + NOTGate ng3 = new NOTGate(10*28, 10*32, room); + ng3.rotate(1); + items.addElement(ng3); + NOTGate ng4 = new NOTGate(14*28, 10*32, room); + ng4.rotate(-1); + items.addElement(ng4); + ANDGate ag = new ANDGate(6*28,8*32,room); + ag.rotate(1); + items.addElement(ag); + XORGate xg = new XORGate(12*28,8*32,room); + xg.rotate(-1); + items.addElement(xg); + FlipFlop ff = new FlipFlop(9*28,7*32,room); + items.addElement(ff); + ORGate og = new ORGate(12*28,6*32,room); + og.rotate(1); + items.addElement(og); + new Wire(ag.ports[0], ng1.ports[1]); + new Wire(ng2.ports[1], ag.ports[1]); + new Wire(ng3.ports[1], xg.ports[0]); + new Wire(xg.ports[1], ng4.ports[1]); + new Wire(ag.ports[2], ff.ports[0]); + new Wire(xg.ports[2], ff.ports[1]); + new Wire(og.ports[0], ff.ports[2]); + new Wire(og.ports[1], ff.ports[3]); + } + + + int[] list1={1,2,3,4,5,6}; + LinkRoomsHorizontally(list1); + int[] list2={11,10,9,8,7}; + LinkRoomsHorizontally(list2); + int[] list3={12,13,14,15,16,40,41,17,18,24,29}; + LinkRoomsHorizontally(list3); + int[] list4={23,22,19,18,34,36,39,1}; + LinkRoomsVertically(list4); + int[] list5={26,25,24,27,28}; + LinkRoomsVertically(list5); + int[] list6={31,30,29,32,33}; + LinkRoomsVertically(list6); + LinkRoomsLeftRight(21,20); + LinkRoomsLeftRight(20,19); + LinkRoomsLeftRight(35,34); + LinkRoomsLeftRight(37,36); + LinkRoomsUpDown(4,10); + LinkRoomsUpDown(6,7); + LinkRoomsUpDown(11,12); + LinkRoomsUpDown(37,38); + + gameCursor = new LabCursor(16*28+14,5*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + } + +} diff --git a/src/com/droidquest/levels/ROTut3.java b/src/com/droidquest/levels/ROTut3.java new file mode 100644 index 0000000..8fe969a --- /dev/null +++ b/src/com/droidquest/levels/ROTut3.java @@ -0,0 +1,1312 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.LabCursor; +import com.droidquest.avatars.PaintBrush; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.NOTGate; +import com.droidquest.devices.Node; +import com.droidquest.devices.PortDevice; +import com.droidquest.devices.PrototypeChip; +import com.droidquest.devices.RoomSensor; +import com.droidquest.devices.SmallChip; +import com.droidquest.items.AutoWire; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Burner; +import com.droidquest.items.Crystal; +import com.droidquest.items.Factory; +import com.droidquest.items.Hexagon; +import com.droidquest.items.MazeControl; +import com.droidquest.items.MazeCreator; +import com.droidquest.items.MazeLock; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.Square; +import com.droidquest.items.ToolBox; +import com.droidquest.items.Triangle; +import com.droidquest.items.WhiteRobot; +import com.droidquest.items.WireTester; +import com.droidquest.materials.ChipTester; +import com.droidquest.materials.ChipTrash; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; +import com.droidquest.materials.ShapeEditor; + +class ROTut3 extends Level +{ +public ROTut3(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 2, Light Blue Wall + materials.addElement(new Material(new Color(190,190,255),false,true)); + // Material 3, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, Red Wall + materials.addElement(new Material(new Color(255,0,0),false, true)); + // Material 6, Recharger + materials.addElement(new CrystalRecharger()); + // Material 7, Crystal Shape Editor + materials.addElement(new ShapeEditor(new Crystal(0,0,null,0))); + // Material 8, Hexagon Shape Editor + materials.addElement(new ShapeEditor(new Hexagon(0,0,null,Color.blue))); + // Material 9, Square Shape Editor + materials.addElement(new ShapeEditor(new Square(0,0,null,Color.white))); + // Material 10, Triangle Shape Editor + materials.addElement(new ShapeEditor(new Triangle(0,0,null,new Color(255,128,0)))); + // Material 11, Portal to Innovation Lab; + materials.addElement(new Portal("ROLab.lvl",false, true)); + // Material 12, Portal to Main Menu; + materials.addElement(new Portal("MainMenu.lvl",false, true)); + // Material 13, Trash + materials.addElement(new ChipTrash()); + // Material 14, ChipTester + materials.addElement(new ChipTester()); + // Material 15, MazeLock + materials.addElement(new MazeLock()); + + for (int a=0; a<42; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} + }; + room.RoomArray = table; + room.AddTextBox("INNOVATION LAB Chip Functions",3*28, 2*32, 500); + room.AddTextBox("BURN:", + 2*28, 4*32, 500); + room.AddTextBox("Wire prototype. Position chips in Burner Room. Activate burn button.", + 6*28, 4*32, 400); + room.AddTextBox("SAVE:", + 2*28, 6*32, 500); + room.AddTextBox("Pick up Chip. Press S", + 6*28, 6*32, 500); + room.AddTextBox("LOAD:", + 2*28, 7*32, 500); + room.AddTextBox("Pick up chip. Press L", + 6*28, 7*32, 500); + room.AddTextBox("RECORD:", + 2*28, 8*32, 500); + room.AddTextBox("Pick up chip. Press ?", + 6*28, 8*32, 500); + room.AddTextBox("To continue, press RETURN.", 4*28, 11*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("{BIG} Chip Design", 4*28+16, 2*32, 500); + room.AddTextBox("Welcome! Here you will learn about things you can do in the INNOVATION LAB. You'll learn how to use the:", + 2*28, 3*32, 500); + room.AddTextBox("- Chips", 6*28, 5*32, 500); + room.AddTextBox("- Paintbrush", 6*28, 6*32, 500); + room.AddTextBox("- Factories", 6*28, 7*32, 500); + room.AddTextBox("- Shape Editor", 6*28, 8*32, 500); + room.AddTextBox("If you don't know about ROBOT ANATOMY and TOOLKIT, return to the Main Menu by using the menubar.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Crossroads + Room room = (Room) rooms.elementAt(2); + int[][] table = { + {2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("{BIG} CROSSROADS", 5*28, 5*32, 500); + room.AddTextBox("PAINTBRUSH", 28+14, 2*32, 500); + room.AddTextBox("FACTORY", 8*28+14, 2*32, 100); + room.AddTextBox("SHAPE EDITOR", 16*28, 2*32, 100); + room.AddTextBox("CHIPS", 16*28, 8*32-8, 500); + room.AddTextBox("When you have learned about the Paintbrush, shape editor, and chips, go this way.", + 5*28, 9*32, 400); + room.AddArrow(3*28,0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(10*28,0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(17*28,0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(10*28,383, Arrow.DIR_DOWN, 28, Color.white); + toolbox = new ToolBox(28,10*32,room); + items.addElement(toolbox); + } + { // Room 3, Paths to Paintbrush & Shape Editor + Room room = (Room) rooms.elementAt(3); + int[][] table = { + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {0,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,0}, + {0,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,0}, + {0,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,0}, + {2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2}, + {2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2} + }; + room.RoomArray = table; + room.AddArrow(0,6*32+16, Arrow.DIR_LEFT, 28, Color.white); + room.AddArrow(10*28,0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 4, Paintbrush intro + Room room = (Room) rooms.elementAt(4); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("This is a PAINTBRUSH.", + 2*28, 2*32, 300); + room.AddTextBox("Use it in special rooms in the INNOVATION LAB to design mazes.", + 2*28, 3*32, 400); + room.AddTextBox("Press P to become the Paintbrush.", + 2*28, 8*32, 500); + room.AddTextBox("Press C to become the Cursor.", + 2*28, 10*32, 500); +// PaintBrush pb = new PaintBrush(); +// pb.x = 17*28+10; +// pb.y = 44; +// pb.room = room; +// items.addElement(pb); + room.AddArrow(0,6*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 5, Paintbrush intro 2 + Room room = (Room) rooms.elementAt(5); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Try painting and erasing walls in the maze rooms below.", + 2*28, 2*32, 500); + room.AddTextBox("To paint, press the SPACEBAR and move the paintbrush.", + 2*28, 4*32, 500); + room.AddTextBox("To erase, sit on a wall and press SPACEBAR as you move.", + 2*28, 6*32, 500); + room.AddTextBox("Paintable Maze Rooms", + 1*28, 9*32, 100); + room.AddTextBox("Return to the Cross- roads when you have finished your maze.", + 9*28, 9*32, 300); + room.AddArrow(3*28,383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 6, Maze Top Left + Room room = (Room) rooms.elementAt(6); + int[][] table = { + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0}, + {5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 7, Maze Top Right + Room room = (Room) rooms.elementAt(7); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,5} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 8, Maze Bottom Left + Room room = (Room) rooms.elementAt(8); + int[][] table = { + {5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 9, Maze Bottom Right + Room room = (Room) rooms.elementAt(9); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.editable=true; + } + { // Room 10, Shape Editor intro + Room room = (Room) rooms.elementAt(10); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("The INNOVATION LAB contains a SHAPE EDITOR like the one next door.", + 2*28, 2*32, 500); + room.AddTextBox("You can use the shape editor to change the shapes of the sensors and the objects they detect.", + 2*28, 5*32, 500); + room.AddTextBox("Go try the shape editor. Take the crystal or sensor with you.", + 2*28, 10*32, 500); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new Crystal(5*28, 8*32, room, 100000)); + items.addElement(new DirectionalSensor(11*28, 6*32, room, new Crystal(0,0,null,0))); + } + { // Room 11, Shape Editor room + Room room = (Room) rooms.elementAt(11); + int[][] table = { + {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 0, 7, 0, 0, 0, 0, 8, 0, 0, 0, 0, 9, 0, 0, 0, 0,10, 0, 4}, + {4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, + {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4} + }; + room.RoomArray = table; + room.AddTextBox("Shape Editor", 7*28, 2*32, 200); + room.AddTextBox("Shape Icons", 7*28, 8*32, 200); + room.AddTextBox("Pass a sensor or item over one of the shape icons to change it to that shape.", + 2*28, 3*32, 500); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 12, Shape Editor workshop + Room room = (Room) rooms.elementAt(12); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("This robot will beep when it touches an energy crystal. Try it.", + 2*28, 2*32, 400); + room.AddTextBox("Now, unwire the sensor in the robot and change its shape to a triangle.", + 2*28, 5*32, 400); + room.AddTextBox("Wire it up again and make it beep when it touches the triangle.", + 2*28, 8*32, 500); + room.AddTextBox("Then return to the Crossroads.", + 2*28, 10*32, 500); + BlueRobot robot = new BlueRobot(16*28, 2*32, room); + items.addElement(robot); + ContactSensor sensor = new ContactSensor(4*28, 6*32, robot.InternalRoom, new Crystal(0,0,null,0)); + items.addElement(sensor); + Wire wire = new Wire(robot.devices[8].ports[0], sensor.ports[0]); + items.addElement(new Triangle(15*28, 4*32, room, new Color(255,128,0))); + items.addElement(new Crystal(17*28, 4*32, room, 100000)); + } + { // Room 13, Prototype Intro + Room room = (Room) rooms.elementAt(13); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("This is a PROTOTYPE CHIP. It has 8 pins that can be soldered to wires.", + 2*28, 2*32, 250); + room.AddTextBox("Notice how the pins are numbered.", + 2*28, 5*32, 250); + room.AddTextBox("CROSSROADS", + 36, 7*32+24, 300); + room.AddTextBox("The pins on this chip are neither outputs nor inputs because the chip isn't wired.", + 2*28, 10*32, 550); + room.AddTextBox("1 2 3 4", + 13*28, 2*32, 30); + room.AddTextBox("8 7 6 5", + 18*28, 2*32, 30); + room.AddArrow(0,7*32+16, Arrow.DIR_LEFT, 28, Color.white); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new PrototypeChip(14*28, 2*32-8,room)); + } + { // Room 14, Prototype Intro 2 + Room room = (Room) rooms.elementAt(14); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("But chips can be wired inside!", + 2*28, 2*32, 500); + room.AddTextBox("You can create circuits inside a prototype chip (using nodes, fliplflops, and logic gates) and connect them to the pins inside.", + 2*28, 4*32, 480); + room.AddTextBox("When a chip is wired, pins change to outputs or inputs, depending on how they are wired. Unwired pins remain neutral.", + 2*28, 8*32, 480); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 15, Prototype Chip + Room room = (Room) rooms.elementAt(15); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("This prototype chip has a circuit inside.", + 2*28, 2*32, 400); + room.AddTextBox("This circuit sends out pulses of electricity. Go inside the chip and see.", + 2*28, 5*32, 400); + room.AddTextBox("Because of the circuit wiring, pin 1 is now an input on the inside and an output on the outside.", + 2*28, 8*32, 500); + room.AddTextBox("Take the chip with you.", + 2*28, 11*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + PrototypeChip pc = new PrototypeChip(14*28, 2*32-8,room); + items.addElement(pc); + Node node = new Node(4*28, 2*32, pc.InternalRoom, Node.TYPE_STRAIGHT); + items.addElement(node); + NOTGate ng = new NOTGate(6*28, 3*32, pc.InternalRoom); + items.addElement(ng); + Wire wire = new Wire(node.ports[0], ng.ports[1]); + wire = new Wire(ng.ports[0], node.ports[2]); + wire = new Wire(pc.portdevices[0].ports[0], node.ports[1]); + } + { // Room 16, Antenna + Room room = (Room) rooms.elementAt(16); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2} + }; + room.RoomArray = table; + room.AddTextBox("You can use a chip with a circuit inside to activate a robot part.", + 5*28, 2*32, 350); + room.AddTextBox("Solder pin 1 to the INPUT of this antenna. Notice how the antenna pulses on and off.", + 5*28, 9*32, 300); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + } + { // Room 17, Antenna & SmallChip + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,2} + }; + room.RoomArray = table; + room.AddTextBox("This SMALL CHIP was created by 'burning' into it a copy of the prototype chip's circuit.", + 6*28, 2*32, 400); + room.AddTextBox("It work's just like a prototype chip, but you can't go inside.", + 6*28, 5*32, 400); + room.AddTextBox("Solder pin 1 (upper left pin) to the antenna INPUT. Does it work like the prototype chip?", + 2*28, 9*32, 450); + room.AddArrow(17*28+14,383, Arrow.DIR_DOWN, 28, Color.white); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + SmallChip sc = new SmallChip(4*28, 4*32, room, "1"); + items.addElement(sc); + sc.LoadChip("chips/oscillator.chip"); + } + { // Room 18, Burner Intro + Room room = (Room) rooms.elementAt(18); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Small chips are 'burned' in the Burner Room of the INNOVATION LAB.", + 2*28, 2*32, 400); + room.AddTextBox("Go look at the burner room at the left.", + 2*28, 5*32, 400); + room.AddTextBox("Look here", + 0, 6*32, 100); + room.AddTextBox("To burn a chip, become the cursor and sit on the burn button. Then press SPACEBAR. Try it now and see what happens.", + 5*28, 9*32, 400); + room.AddArrow(0,7*32, Arrow.DIR_LEFT, 28, Color.white); + room.AddArrow(2*28+14,383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 19, Burner Room + Room room = (Room) rooms.elementAt(19); + int[][] table = { + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, + {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4}, + {4,0,4,0,0,0,0,4,0,0,0,0,0,0,0,0,4,0,0,0}, + {4,0,4,0,0,0,0,4,0,0,0,0,0,0,0,0,4,0,0,0}, + {4,0,4,0,0,0,0,4,0,0,0,4,0,0,4,0,4,0,0,0}, + {4,0,4,4,4,4,4,4,0,0,0,4,0,0,4,0,4,0,0,0}, + {4,0,0,0,4,4,0,0,0,0,0,4,4,4,4,0,4,0,0,4}, + {4,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,4,0,0,4}, + {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4} + }; + room.RoomArray = table; + room.AddTextBox("Burner Room", + 2*28, 2*32, 400); + room.AddTextBox("Prototype chip goes here.", + 2*28, 4*32, 250); + room.AddTextBox("Small chip goes here.", + 11*28, 6*32, 170); + room.AddTextBox("BURN BUTTON", + 17*28, 8*32, 100); + room.AddArrow(5*28,5*32+16, Arrow.DIR_DOWN, 28, Color.white); + room.AddArrow(13*28,7*32+16, Arrow.DIR_DOWN, 28, Color.white); + room.AddArrow(18*28+14,9*32+16, Arrow.DIR_DOWN, 28, Color.white); + PrototypeChip pc = new PrototypeChip(3*28+4, 5*32+12, room); + items.addElement(pc); + pc.inBurner = true; + SmallChip sc = new SmallChip(13*28-13, 8*32-15, room, "1"); + items.addElement(sc); + sc.inBurner = true; + items.addElement(new Burner(18*28, 10*32+2, room)); + } + { // Room 20, Nesting + Room room = (Room) rooms.elementAt(20); + int[][] table = { + {2,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("You can use small chips as part of a circuit inside the prototype chip. This is called 'nesting'.", + 4*28, 2*32, 400); + room.AddArrow(0,6*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 21, Nesting II + Room room = (Room) rooms.elementAt(21); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Take the shortcut up. Bring back the prototype chip and the small chip.", + 2*28, 3*32, 400); + room.AddTextBox("Disconnect the wires in the prototype chip.", + 2*28, 6*32, 400); + room.AddTextBox("Take both chips next door to try nesting the small chip inside the prototype chip.", + 2*28, 9*32, 500); + room.AddTextBox("SHORTCUT", + 14*28, 32-8, 100); + room.AddArrow(18*28+14,0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(0,6*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 22, Nesting III + Room room = (Room) rooms.elementAt(22); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Take the small chip inside the prototype chip. Solder it's pin 1 to the prototype's pin 1.", + 2*28, 2*32, 500); + room.AddTextBox("Next, solder a NOT-gate's OUTPUT to the prototype's pin 3.", + 2*28, 5*32, 500); + room.AddTextBox("Come outside and take the chip into the next room.", + 2*28, 9*32, 500); + room.AddArrow(0,6*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 23, Nesting workshop + Room room = (Room) rooms.elementAt(23); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Put the prototype chip in the robot and solder the pins as shown:", + 2*28, 2*32, 500); + room.AddTextBox("Pin 1 to the antenna INPUT Pin 2 to the left thruster", + 3*28, 4*32, 350); + room.AddTextBox("Close the robot's thruster switch.", + 5*28, 8*32, 400); + room.AddTextBox("Now you have a robot that moves right and beeps.", + 5*28, 10*32, 400); + room.AddArrow(2*28+14,383, Arrow.DIR_DOWN, 28, Color.white); + OrangeRobot robot = new OrangeRobot(16*28, 3*32, room); + items.addElement(robot); + items.addElement(new RoomSensor(8*28, 3*32, robot.InternalRoom, + new Square(0,0,null,Color.white))); + items.addElement(new ContactSensor(10*28, 5*32, robot.InternalRoom, + new Hexagon(0,0,null,Color.white))); + } + { // Room 24, Wallhugger intro + Room room = (Room) rooms.elementAt(24); + int[][] table = { + {2,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("By nesting chips inside chips, you can create very complex circuits.", + 6*28, 2*32, 400); + room.AddTextBox("This WALLHUGGER chip is an example of a complex circuit. It is wired with 16 logic gates and one nested chip.", + 6*28, 5*32, 400); + room.AddTextBox("Take the chip with you.", + 6*28, 10*32, 500); + room.AddArrow(0,9*32+16, Arrow.DIR_LEFT, 28, Color.white); + SmallChip sc = new SmallChip(4*28, 5*32, room, "3"); + items.addElement(sc); + sc.LoadChip("chips/WallHugger.chip"); + } + { // Room 25, Wallhugger wiring + Room room = (Room) rooms.elementAt(25); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("You can use chips inside robots.", + 2*28, 2*32, 400); + room.AddTextBox("Take the WALLHUGGER chip inside this robot.", + 2*28, 3*32, 400); + room.AddTextBox("Solder the pins as shown.", + 2*28, 5*32, 400); + room.AddTextBox("PIN TO PIN TO", + 2*28, 6*32, 400); + room.AddTextBox("1 top thruster 2 left bumper 3 left thruster 4 bottom bumper", + 3*28, 6*32+16, 250); + room.AddTextBox("8 top bumper 7 right thruster 6 right bumper 5 bottom thruster", + 11*28, 6*32+16, 240); + room.AddArrow(0,9*32+16, Arrow.DIR_LEFT, 28, Color.white); + WhiteRobot robot = new WhiteRobot(16*28, 3*32, room); + items.addElement(robot); + items.addElement(new DirectionalSensor(8*28, 3*32, robot.InternalRoom, + new Crystal(0,0,null,0))); + items.addElement(new ContactSensor(10*28, 5*32, robot.InternalRoom, + new Crystal(0,0,null,0))); + } + { // Room 26, Wallhugger intro II + Room room = (Room) rooms.elementAt(26); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,2} + }; + room.RoomArray = table; + room.AddTextBox("Take the robot to the maze below. Close the thruster switch.", + 2*28, 2*32, 400); + room.AddTextBox("How does the WALLHUGGER chip work in this kind of maze?", + 2*28, 5*32, 400); + room.AddTextBox("Maze", + 16*28, 11*32, 400); + room.AddArrow(17*28,383, Arrow.DIR_DOWN, 28, Color.white); + room.AddArrow(0,9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 27, Wallhugger maze + Room room = (Room) rooms.elementAt(27); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,2}, + {2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,2,2,2}, + {2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,0,0,0,0,2,0,0,0,0,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + } + { // Room 28, Chip speed + Room room = (Room) rooms.elementAt(28); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Chips can also be set to run faster than normal circuits.", + 2*28, 2*32, 500); + room.AddTextBox("The Burner Room in the INNOVATION LAB has a SPEED SETTING that can be changed by using the Up and Down arrows in the Burner Room. A chip receives this speed setting when it's burned.", + 2*28, 4*32, 500); + room.AddTextBox("A chip's speed sets the number of times the chip will be processed in one INSTANT. One instant is the time it takes for a gate (outside a chip) to process its inputs and send an output.", + 2*28, 8*32, 500); + room.AddArrow(0,9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 29, Chip talk + Room room = (Room) rooms.elementAt(29); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Here are some special uses of chips.", + 2*28, 2*32, 500); + room.AddTextBox("Chips can be wired inside other chips to create very complex chips.", + 3*28, 3*32, 450); + room.AddTextBox("Chips can be transferred to ROBOTROPOLIS where you can use them to help you escape.", + 3*28, 5*32, 450); + room.AddTextBox("Chips can be used to save space in a robot.", + 3*28, 7*32, 450); + room.AddTextBox("Chips can be used to make complex circuits run as fast as a single gate.", + 3*28, 9*32, 450); + room.AddArrow(0,9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 30, Chip Record + Room room = (Room) rooms.elementAt(30); + int[][] table = { + {3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("You can make a RECORD of a chip's circuit. You can then review the chip's record whenever you want.", + 4*28, 2*32, 400); + room.AddTextBox("Pick up this chip and press ? to see and edit its record.", + 4*28, 5*32, 400); + room.AddTextBox("You can also use the record to change the label on the small chip. Just change the letter in the top right field and press Save.", + 4*28, 7*32, 400); + room.AddArrow(2*28+14,0, Arrow.DIR_UP, 28, Color.white); + SmallChip sc = new SmallChip(2*28, 5*32, room, "5"); + items.addElement(sc); + sc.LoadChip("chips/gates.chip"); + } + { // Room 31, Chip Save + Room room = (Room) rooms.elementAt(31); + int[][] table = { + {3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("You can also save a chip's circuit for later use.", + 4*28, 2*32, 400); + room.AddTextBox("To save a chip's circuit, pick up a chip in the INNOVATION LAB and press S.", + 4*28, 4*32+16, 400); + room.AddTextBox("You can recycle small chips. First save the old version of the chip. Then burn in a new circuit.", + 4*28, 8*32, 400); + room.AddArrow(2*28+14,0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 32, Chip Load + Room room = (Room) rooms.elementAt(32); + int[][] table = { + {3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("You can LOAD circuits you have saved into small chips.", + 4*28, 3*32, 400); + room.AddTextBox("To load a chip, pick up a chip and press L. A dialog box of circuit names will appear. Select the one you want.", + 4*28, 5*32, 400); + room.AddTextBox("Chips can be loaded in the INNOVATION LAB or in ROBOTROPOLIS where you can use them to help you escape.", + 4*28, 8*32, 400); + room.AddArrow(2*28+14,0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 33, Exit + Room room = (Room) rooms.elementAt(33); + int[][] table = { + {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table; + room.AddTextBox("You have learned how to use many features of the INNOVATION LAB.", + 2*28, 3*32, 500); + room.AddTextBox("Go to the INNOVATION LAB.", + 6*28, 7*32, 500); + room.AddTextBox("Return to the MAIN MENU.", + 6*28, 9*32, 500); + room.AddTextBox("Press ? for help or hints.", + 2*28, 11*32, 500); + } + { // Room 34, Paintbrush colors + Room room = (Room) rooms.elementAt(34); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("The Paintbrush can also paint walls of different colors and properties. Press P to change colors.", + 2*28, 2*32, 500); + room.AddTextBox("{255,000,000} RED {128,128,128} walls block all robots and are detectable.", + 3*28, 5*32, 500); + room.AddTextBox("{000,255,000} GREEN {128,128,128} walls block all robots and are not detectable.", + 3*28, 7*32, 450); + room.AddTextBox("{255,128,000} ORANGE, {255,255,255} WHITE, {128,128,128} and {000,000,255} BLUE {128,128,128} walls block their respectivly colored robots, and are not detectable.", + 3*28, 9*32, 500); + } + + { // Room 35, Factory Intro + Room room = (Room) rooms.elementAt(35); + int[][] table = { + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("The INNOVATION LAB has two FACTORIES for creating chips, shapes, and sensors.", + 2*28, 2*32, 500); + room.AddTextBox("Factories also have TRASH containers, which you can use to dispose of items that you no longer need.", + 2*28, 5*32, 500); + room.AddTextBox("Go try the factory in the next room.", + 2*28, 8*32, 500); + room.AddArrow(11*28,0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 36, Factory + Room room = (Room) rooms.elementAt(36); + int[][] table = { + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2,13,13,13,13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2,13,13,13,13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2,13,13,13,13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2,13,13,13,13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table; + room.AddTextBox("FACTORY", + 8*28+14, 2*32, 500); + room.AddTextBox("Press to summon an Energy Crystal", + 5*28, 3*32+24, 500); + items.addElement(new Factory(2*28,3*32,room,new Crystal(0,0,null,100000))); + room.AddArrow(3*28+14, 4*28, Arrow.DIR_LEFT, 28, Color.white); + room.AddTextBox("Drag crystal into Trash to dispose.", + 2*28, 6*32-8, 500); + room.AddTextBox("TRASH", + 2*28, 9*32, 500); + room.AddArrow(3*28, 7*32, Arrow.DIR_DOWN, 28, Color.white); + room.AddTextBox("Return to the Crossroads.", + 12*28, 10*32, 200); + } + { // Room 37, Unburning + Room room = (Room) rooms.elementAt(37); + int[][] table = { + {2,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("Chips can also be unburned.", + 2*28, 2*32, 500); + room.AddTextBox("To unburn a chip, place a burned or loaded chip into the right holder, and an empty Prototype chip in the left. Then press the UNBURN button.", + 2*28, 4*32, 500); + room.AddTextBox("The Prototype chip will automatically be wired to match the small chip's circutry.", + 2*28, 8*32, 500); + room.AddArrow(2*28+14,559, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 38, ChipTest intro + Room room = (Room) rooms.elementAt(38); + int[][] table = { + {3,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("To the Crossroads", + 28, 32+16, 500); + room.AddTextBox("The Innovation Lab also has a CHIP TESTER for testing prototype chips and small chips.", + 4*28, 3*32, 450); + room.AddTextBox("Place a chip in the holder and then press the AUTOWIRE button. The chip will be wired to the tester, and the buttons can be used to set or display port values.", + 4*28, 6*32, 450); + room.AddTextBox("Press the autowire button again to unwire the chip.", + 4*28, 10*32, 450); + room.AddArrow(28+14,0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 39, Chip Testing + Room room = (Room) rooms.elementAt(39); + int[][] table = { + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 2,14,14,14,14,14,14, 2, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 2,14,14,14,14,14,14, 2, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 2,14,14,14,14,14,14, 2, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 2,14,14,14,14,14,14, 2, 0, 0, 0, 0, 0, 2}, + {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}, + {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} + }; + room.RoomArray = table; + room.AddTextBox("Chip Tester", 2*28, 32+24, 500); + PortDevice[] portdevices = new PortDevice[8]; + portdevices[0] = new PortDevice(6*28,3*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[1] = new PortDevice(6*28,4*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[2] = new PortDevice(6*28,5*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[3] = new PortDevice(6*28,6*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[4] = new PortDevice(12*28+8,6*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[5] = new PortDevice(12*28+8,5*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[6] = new PortDevice(12*28+8,4*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[7] = new PortDevice(12*28+8,3*32+8,room,28,Port.TYPE_UNDEFINED); + portdevices[0].rotate(1); + portdevices[1].rotate(1); + portdevices[2].rotate(1); + portdevices[3].rotate(1); + portdevices[4].rotate(-1); + portdevices[5].rotate(-1); + portdevices[6].rotate(-1); + portdevices[7].rotate(-1); + for (int a=0; a<8; a++) + items.addElement(portdevices[a]); + items.addElement(new AutoWire(2*28,10*32,room)); + items.addElement(new WireTester(5*28,3*32,room,portdevices[0])); + items.addElement(new WireTester(5*28,4*32,room,portdevices[1])); + items.addElement(new WireTester(5*28,5*32,room,portdevices[2])); + items.addElement(new WireTester(5*28,6*32,room,portdevices[3])); + items.addElement(new WireTester(14*28+2,6*32,room,portdevices[4])); + items.addElement(new WireTester(14*28+2,5*32,room,portdevices[5])); + items.addElement(new WireTester(14*28+2,4*32,room,portdevices[6])); + items.addElement(new WireTester(14*28+2,3*32,room,portdevices[7])); + room.AddArrow(3*28,10*32+16,Arrow.DIR_LEFT,28,Color.white); + room.AddTextBox("Autowirer",4*28,11*32-8,200); + } + { // Room 40, Maze Control + Room room = (Room) rooms.elementAt(40); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; + room.AddTextBox("The Maze can also be changed to whatever size you want.", + 2*28, 2*32, 500); + room.AddTextBox("The Innovation Lab's MAZE CONTROL ROOM has five buttons that allow you to set the size the maze, and a sixth button that locks the maze by preventing the cursor from becoming the paintbrush.", + 2*28, 4*32, 500); + room.AddTextBox("You can use this to create your own puzzles and share them with your friends.", + 2*28, 8*32, 500); + room.AddTextBox("Try it in the next room.", + 2*28, 11*32, 500); + } + { // Room 41, Maze Control + Room room = (Room) rooms.elementAt(41); + int[][] table = { + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}, + {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,2}, + {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2} + }; + room.RoomArray = table; +// room.AddTextBox("", +// 2*28, 2*32, 500); + room.AddTextBox("Maze Control Room", 178, 2*32, 300); + room.AddTextBox("4x2", 262, 5*32+24, 500); + items.addElement(new MazeControl(9*28+14,3*32+6,room,MazeControl.DIR_UP)); + items.addElement(new MazeControl(9*28+14,7*32,room,MazeControl.DIR_DOWN)); + items.addElement(new MazeControl(7*28+2,5*32+4,room,MazeControl.DIR_LEFT)); + items.addElement(new MazeControl(12*28,5*32+4,room,MazeControl.DIR_RIGHT)); + items.addElement(new MazeCreator(2*28, 10*32, room)); + room.AddArrow(3*28+14,10*32+12, Arrow.DIR_LEFT, 28, Color.white); + room.AddTextBox("Press to resize Maze", 5*28, 10*32+18, 500); + room.AddArrow(18*28+14,10*32, Arrow.DIR_DOWN, 28, Color.white); + room.AddTextBox("Lock", 17*28+4, 9*32-4, 100); + room.AddTextBox("These arrows change the size of the maze.", 2*28, 4*32, 150); + } + + int[] list1 = {1,2,13,14,15,16,17}; + LinkRoomsHorizontally(list1); + + int[] list2 = {36,35,3,2,33}; + LinkRoomsVertically(list2); + + int[] list3 = {17,18,37,20}; + LinkRoomsVertically(list3); + LinkRoomsUpDown(16,21); + LinkRoomsLeftRight(19,18); + + int[] list4 = {23,22,21,20}; + LinkRoomsHorizontally(list4); + + int[] list5 = {30,29,28,26,25,24}; + LinkRoomsHorizontally(list5); + LinkRoomsUpDown(23,24); + LinkRoomsUpDown(26,27); + + int[] list6 = {13,38,32,31,30}; + LinkRoomsVertically(list6); + LinkRoomsLeftRight(38,39); + + int[] list7 = {41,40,34,5,4,3,10,11,12}; + LinkRoomsHorizontally(list7); + + int[][] grid = { + {6,7}, + {8,9} + }; + LinkRoomsGrid(grid); + LinkRoomsUpDown(5,6); + + + { // Paintbrush code comes after Robots are constructed + Room room = (Room) rooms.elementAt(4); + PaintBrush pb = new PaintBrush(); + pb.x = 17*28+10; + pb.y = 44; + pb.room = room; + items.addElement(pb); + } + + + gameCursor = new LabCursor(16*28+14,5*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + paintbrush = new PaintBrush(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + items.addElement(paintbrush); + player = gameCursor; + currentViewer = player; + + } + +} \ No newline at end of file diff --git a/src/com/droidquest/levels/ROTutA.java b/src/com/droidquest/levels/ROTutA.java new file mode 100644 index 0000000..40db85a --- /dev/null +++ b/src/com/droidquest/levels/ROTutA.java @@ -0,0 +1,509 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.NOTGate; +import com.droidquest.devices.RoomSensor; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Crystal; +import com.droidquest.items.GenericRobot; +import com.droidquest.items.Key; +import com.droidquest.items.Magnet; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.Sentry; +import com.droidquest.items.SentryT1; +import com.droidquest.items.Triangle; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.CrystalRecharger; +import com.droidquest.materials.Lock; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class ROTutA extends Level +{ +public ROTutA(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 3, Orange Wall + materials.addElement(new Material(new Color(255,128,0),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, CrystalRecharger + materials.addElement(new CrystalRecharger()); + // Material 6, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 7, LockT1 + int[][] lockProgram = { + {Lock.NARROW}, + {12,10,0 }, + {12,9,0, 12,6,1}, + {12,8,0, 12,5,1}, + {Lock.NARROW}, + {12,5,0, 12,8,1}, + {12,6,0, 12,9,1}, + {12,10,1}, + }; + materials.addElement(new Lock(Color.white, Color.blue, lockProgram)); + // Material 8, Portal to First Level; + materials.addElement(new Portal("RO1.lvl",false, true)); + // Material 9, Portal to Tutorial B; + materials.addElement(new Portal("ROTutB.lvl",false, true)); + // Material 10, Portal to Main Menu; + materials.addElement(new Portal("MainMenu.lvl",false, true)); + + for (int a=0; a<27; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,2); + room.AddTextBox("Use the ARROW KEYS or LEFT MOUSE BUTTON to move.", + 2*28, 2*32, 500); + room.AddTextBox("Use SPACEBAR or RIGHT MOUSE BUTTON to pick up objects.", + 2*28, 4*32, 500); + room.AddTextBox("Use R to turn the Remote Control on or off.", + 2*28, 6*32, 500); + room.AddTextBox("Use C to change to Cursor", + 2*28, 8*32, 500); + room.AddTextBox("Use the Menubar above to control sound, or to return to the Main Menu level.", + 2*28, 9*32, 450); + room.AddTextBox("To continue, press RETURN", + 5*28, 11*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,5,19,7,0); + room.SetMaterial(0,10,0); + room.AddTextBox("{BIG} ROBOT ANATOMY", 4*28, 2*32, 500); + room.AddTextBox("Welcome Traveller!", 2*28, 3*32, 16*32); + room.AddTextBox("Before you venture into Robotropolis, we suggest you take our brief tour. We'll show you how to use robots to help you escape the Sewer (Level 1) of Robotropolis.", + 2*28, 5*32, 500); + room.AddTextBox("Press ? for special keys.", 5*28, 10*32, 500); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Movement + Room room = (Room) rooms.elementAt(2); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(0,5,19,7,0); + room.AddTextBox("You can move the cursor using the Arrow keys on your keyboard, or by clicking anywhere on the screen with the mouse.", + 2*28, 2*32, 500); + room.AddTextBox("Click here", 3*28, 8*32, 500); + room.AddArrow(5*28,6*32+16, Arrow.DIR_UP, 28, Color.white) ; + room.AddTextBox("Double-Click here", 12*28+14, 8*32, 160); + room.AddArrow(15*28,6*32+16, Arrow.DIR_UP, 28, Color.white) ; + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 3, Movement 2 + Room room = (Room) rooms.elementAt(3); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialFill(0,5,19,7,0); + room.AddTextBox("Double-Clicking the mouse on one side of the cursor starts your cursor moving in that direction until it reaches a wall or the next room.", + 2*28, 2*32, 500); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 4, Pick up Key + Room room = (Room) rooms.elementAt(4); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("You can pick up and drop objects.", + 2*28, 2*32, 500); + room.AddTextBox("To pick up an object, move on top of it and press the SPACEBAR (or Right-Click the mouse).", + 2*28, 3*32, 500); + room.AddTextBox("Pick up this key and move it around. To drop it, press the SPACEBAR again.", + 2*28, 8*32, 500); + room.AddTextBox("Take the Key with you", + 6*28, 10*32+16, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new Key(9*28, 5*32, room, Color.blue)); + } + { // Room 5, Locked Sentry + Room room = (Room) rooms.elementAt(5); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(8,11,11,11,0); + room.SetMaterialOutline(12,7,19,11,1); + room.SetMaterial(12,7,7); + room.AddTextBox("You can move in small steps. Press the control key and the cursor keys at the same time.", + 2*28, 2*32, 500); + room.AddTextBox("This sentry is trapped.", + 2*28, 4*32+16, 500); + room.AddTextBox("To let it out, hold the key by the HANDLE. Use small steps to put the key in the lock.", + 2*28, 6*32, 500); + room.AddArrow(10*28, 383, Arrow.DIR_DOWN, 28, Color.white) ; + items.addElement(new SentryT1(17*28, 9*32+16, room)); + } + { // Room 6, Command Summary + Room room = (Room) rooms.elementAt(6); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(8,0,11,0,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("S and T are two commands you won't need till later. If you press S you will change to a Solderpen. Just press C to change back to the Cursor.", + 2*28, 3*32, 500); + room.AddTextBox("If you press T you will get a Toolkit.", + 2*28, 6*32, 500); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 7, Scanner + Room room = (Room) rooms.elementAt(7); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(19,4,19,6,0); + room.AddTextBox("This robot will help you escape from the Sewer. Its name is Scanner.", + 2*28, 3*32, 350); + room.AddTextBox("Go inside it by moving on top of it and pressing E.", + 2*28, 7*32, 500); + room.AddTextBox("Then come back out and carry Scanner with you.", + 2*28, 9*32, 500); + room.AddArrow(559, 5*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + + GenericRobot robot = new BlueRobot(13*28,3*32,room); + items.addElement(robot); + { + robot.charge = 0; + robot.thrusterPower=true; + NOTGate ng = new NOTGate(5*28,4*32,robot.InternalRoom); + items.addElement(ng); + Wire dummy; + dummy = new Wire(ng.ports[1], robot.devices[0].ports[0]); + robot.InternalRoom.AddTextBox("Scanner", 8*28, 2*32, 200); + robot.InternalRoom.AddTextBox("EYE", 13*28, 3*32-8, 100); + robot.InternalRoom.AddArrow(16*28, 2*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + robot.charge = 100000; + robot.thrusterPower = false; + robot.InternalRoom.AddTextBox("Go through one of the four exits or press X to leave.", + 5*28, 9*32, 350); + } + } + { // Room 8, Periscope + Room room = (Room) rooms.elementAt(8); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,4,0,6,0); + room.SetMaterialOutline(19,2,19,4,0); + room.AddTextBox("You can be inside a robot and still see outside.", + 2*28, 3*32, 500); + room.AddTextBox("Go inside Scanner. Sit on the robot's EYE to use its periscope. Move off the eye to see inside the robot again. Come outside when you are done.", + 2*28, 7*32, 500); + room.AddTextBox("Take Scanner with you.", + 2*28, 10*32, 500); + room.AddArrow(559, 3*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 9, Magnet + Room room = (Room) rooms.elementAt(9); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,2,0,4,0); + room.SetMaterialOutline(19,7,19,9,0); + room.SetMaterialOutline(18,11,18,11,0); + items.addElement(new Magnet(11*28, 7*32, room)); + room.AddTextBox("Robots make handy carrying bags for objects.", + 2*28, 2*32, 500); + room.AddTextBox("Put this magnet inside Scanner.", + 2*28, 7*32, 200); + room.AddTextBox("For now, leave Scanner here.", + 2*28, 10*32, 500); + room.AddArrow(559, 8*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 10, Sparky + Room room = (Room) rooms.elementAt(10); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,7,0,9,0); + room.SetMaterialOutline(1,11,4,11,0); + room.SetMaterialOutline(13,0,19,5,1); + room.SetMaterialOutline(16,5,18,5,0); + room.AddTextBox("Robots can move only if the Remote Control (the antenna above you) is on. Press R to turn it on and off.", + 2*28, 2*32, 300); + room.AddTextBox("Meet Sparky!", + 15*28, 4*32, 120); + room.AddTextBox("Take Sparky with you.", + 5*28, 10*32, 500); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white) ; + OrangeRobot robot = new OrangeRobot(17*28,2*32,room); + robot.charge=100000; + robot.thrusterPower=true; + items.addElement(robot); + NOTGate ng = new NOTGate(7*28,1*32+16,robot.InternalRoom); + ng.rotate(1); ng.rotate(1); + items.addElement(ng); + FlipFlop ff = new FlipFlop(9*28,6*32,robot.InternalRoom); + items.addElement(ff); + new Wire(ng.ports[1], robot.devices[9].ports[0]); + new Wire(robot.devices[7].ports[0], ff.ports[0]); + new Wire(robot.devices[5].ports[0], ff.ports[1]); + new Wire(robot.devices[3].ports[0], ff.ports[2]); + new Wire(robot.devices[1].ports[0], ff.ports[3]); + robot.InternalRoom.AddTextBox("Sparky", 9*28, 2*32, 200); + robot.InternalRoom.AddTextBox("GRABBER", 6*28, 4*32-8, 200); + robot.InternalRoom.AddTextBox("BUMPER", 6*28, 10*32, 200); + robot.InternalRoom.AddTextBox("THRUSTER", 13*28, 5*32, 200); + robot.InternalRoom.AddTextBox("THRUSTER SWITCH", 12*28, 9*32, 150); + robot.InternalRoom.AddArrow(5*28, 3*32, Arrow.DIR_UP, 28, Color.white) ; + robot.InternalRoom.AddArrow(16*28, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 11, Sparky talk 1 + Room room = (Room) rooms.elementAt(11); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(1,0,4,11,0); + room.AddTextBox("Go inside Sparky to see the wires and other parts that make it move.", + 5*28, 2*32, 400); + room.AddTextBox("In the Robotropolis Sewer you won't need to change any wires. Just look at how each robot moves and choose the right one for the job.", + 5*28, 6*32, 400); + room.AddTextBox("Take Sparky with you.", + 5*28, 10*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 12, Bumper talk + Room room = (Room) rooms.elementAt(12); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(1,0,4,11,0); + room.AddTextBox("The four white lines outside the robot are its BUMPERS. They detect walls that robots bump into. Inside the robot, the bumpers are crescent- shaped with arrows. Go inside Sparky to see.", + 5*28, 2*32, 400); + room.AddTextBox("Take Sparky with you.", + 5*28, 10*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 13, Thruster talk + Room room = (Room) rooms.elementAt(13); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(0,4,0,6,0); + room.AddTextBox("Robots are moved by four THRUSTERS. Inside the robot the thrusters look like triangles. Electricity flows through wires to make the robot move.", + 5*28, 2*32, 400); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 14, Thruster Switch talk + Room room = (Room) rooms.elementAt(14); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,4,19,6,0); + room.AddTextBox("The Remote Control stops or starts all the robots at once. If you want the thrusters in only one robot off, use the THRUSTER SWITCH inside.", + 2*28, 2*32, 450); + room.AddTextBox("To turn the switch on or off, sit on it and press SPACEBAR. When it is closed (orange), the thrusters can work. When it is open (white), the robot won't move even if the Remote Control is on.", + 2*28, 7*32+16, 450); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 15, Get Scanner + Room room = (Room) rooms.elementAt(15); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(0,4,19,6,0); + room.SetMaterialOutline(18,0,18,0,0); + room.AddTextBox("Get Scanner from the room above. Experiment with the Remote Control and thruster switches.", + 2*28, 2*32, 500); + room.AddTextBox("The Remote Control turns ALL the robots on or off; the thruster switch controls the thrusters on only one roobt.", + 2*28, 8*32, 500); + room.AddTextBox("Put Scanner inside Sparky and carry both robots with you.", + 2*28, 10*32, 500); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 16, Before Sentry + Room room = (Room) rooms.elementAt(16); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(0,4,19,6,0); + room.SetMaterialOutline(4,4,4,6,3); + room.AddTextBox("Some places in Robotropolis are guarded by sentries like the one in the next room. Try to get past it!", + 2*28, 2*32, 500); + room.AddTextBox("In the Sewer you can ride inside a robot to sneak past a sentry.", + 2*28, 8*32, 500); + room.AddTextBox("Take Sparky with you to see how.", + 2*28, 10*32, 500); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 17, Sentry + Room room = (Room) rooms.elementAt(17); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,4,19,6,0); + room.SetMaterialOutline(1,0,1,0,0); + room.SetMaterialOutline(18,0,18,0,0); + room.AddTextBox("First be sure the Remote Control is off. Then go inside Sparky. Turn the thruster switch on. Sit on the eye.", + 2*28, 2*32, 300); + room.AddTextBox("While you sit on the eye, press R to turn the Remote Control on. Off you go! Press R again to stop.", + 2*28, 8*32, 300); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + int[] pace = {16*28,2*32, 16*28, 10*32}; + int[] program = {4*28,1*32, 10*28,10*32, 0,5*32, + 11*28,1*32, 17*28,10*32, 19*28,5*32}; + items.addElement(new Sentry(16*28,2*32,room,pace,program,false)); + } + { // Room 18, Smiley bypass + Room room = (Room) rooms.elementAt(18); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,0,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,1}, + {1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1}, + {1,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,1,0,0,1}, + {1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, + {1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, + {1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1} + }; + room.RoomArray = table; + } + { // Room 19, Grabber talk + Room room = (Room) rooms.elementAt(19); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,4,19,6,0); + room.SetMaterialOutline(14,0,17,0,0); + room.AddTextBox("Each robot is equipped with a claw shaped GRABBER. Sparky is prewired to grab an object its body touches (not its grabber). Go inside to see the grabber control.", + 2*28, 2*32, 400); + room.AddTextBox("To pick up the triangle, turn the Remote Control on. Then bump Sparky into it.", + 2*28, 9*32, 400); + items.addElement(new Triangle(4*28,6*32,room, new Color(255,128,0))); + room.AddArrow(16*28, 0, Arrow.DIR_UP, 28, Color.white) ; + } + { // Room 20, Checkers + Room room = (Room) rooms.elementAt(20); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(14,11,17,11,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("Robots get energy from BATTERIES. Look at the battery and empty energy level inside Checkers.", + 2*28, 2*32, 500); + room.AddTextBox("Batteries drain quickly in Robotopolis, so turn off the thruster switches and Remote Control to conserve energy whenever possible.", + 2*28, 5*32, 400); + room.AddTextBox("Take Checkers with you.", + 2*28, 10*32, 400); + room.AddTextBox("Meet Checkers!", + 15*28, 8*32, 120); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + WhiteRobot robot = new WhiteRobot(15*28,6*32,room); + items.addElement(robot); + RoomSensor rs = new RoomSensor(7*28,3*32,robot.InternalRoom, + new Crystal(0,0,null,0)); + items.addElement(rs); + rs.rotate(1); rs.rotate(1); + new Wire(rs.ports[0], robot.devices[8].ports[0]); + robot.charge = 0; + robot.thrusterPower = false; + robot.InternalRoom.AddTextBox("Checkers", 8*28+14, 2*32, 200); + robot.InternalRoom.AddTextBox("ANTENNA", 4*28, 5*32, 200); + robot.InternalRoom.AddTextBox("ENERGY LEVEL", 3*28, 8*32+16, 200); + robot.InternalRoom.AddTextBox("BATTERY", 6*28+16, 9*32+16, 200); + robot.InternalRoom.AddArrow(3*28+14,4*32,Arrow.DIR_UP, 28, Color.white); + robot.InternalRoom.AddArrow(2*28+14,8*32+16,Arrow.DIR_DOWN, 28, Color.white); + robot.InternalRoom.AddArrow(5*28,9*32+12,Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 21, Crystals + Room room = (Room) rooms.elementAt(21); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(0,5,0,7,0); + room.AddTextBox("A dead battery can be recharged with an ENERGY CRYSTAL like this one.", + 2*28, 2*32, 350); + room.AddTextBox("Take the crystal inside Checkers and hold it over the black crystal shape on the battery.", + 2*28, 4*32, 500); + room.AddTextBox("The crystal's energy drains into the battery to recharge it. The energy level fills to the top.", + 2*28, 7*32, 500); + room.AddTextBox("Take Checkers with you.", + 2*28, 10*32, 400); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + items.addElement(new Crystal(16*28, 2*32, room, 100000)); + } + { // Room 22, Antenna + Room room = (Room) rooms.elementAt(22); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(19,5,19,7,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("Each robot is equipped with a radio ANTENNA. Checkers' antenna beeps when it is in a room with an energy crystal. (You will see why later.) Take the energy crystal outside of checkers and drop it in this room.", + 2*28, 2*32, 500); + room.AddTextBox("Turn the Remote Control on and off and listen to the antenna.", + 4*28, 8*32, 400); + room.AddTextBox("Put the crystal inside Checkers and take it with you.", + 4*28, 10*32, 400); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 23, Recharger + Room room = (Room) rooms.elementAt(23); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(17,0,18,0,0); + room.SetMaterial(2,9,5); + room.AddTextBox("Dead energy crystals can be recharged with RECHARGERS like this one. Get the energy crystal and pass it over the recharger.", + 2*28, 2*32, 400); + room.AddTextBox("Regrettably there is no recharger in the Sewer, but you may find one in higher levels.", + 2*28, 6*32, 400); + room.AddArrow(18*28, 0, Arrow.DIR_UP, 28, Color.white) ; + } + { // Room 24, End + Room room = (Room) rooms.elementAt(24); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(17,11,18,11,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("Now you are ready for a great adventure in the Sewer. Save your game often so you won't have to start from the beginning when you get stuck.", + 2*28, 2*32, 500); + room.AddTextBox("Conquor the Sewer. Then learn more about robot wiring to prepare for higher game levels.", + 2*28, 5*32, 450); + } + { // Room 25, Portals + Room room = (Room) rooms.elementAt(25); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterial(19,10,0); + room.SetMaterial(4,2,8); + room.SetMaterial(4,5,9); + room.SetMaterial(4,8,10); + room.AddTextBox("Go to the Robotropolis Sewer", + 5*28, 3*32, 400); + room.AddTextBox("Learn about Robot Wiring", + 5*28, 6*32, 400); + room.AddTextBox("Return to the Main Menu", + 5*28, 9*32, 400); + } + { // Room 26, Shortcut + Room room = (Room) rooms.elementAt(26); + room.SetMaterialOutline(0,0,19,9,1); + room.SetMaterialOutline(0,11,19,11,1); + room.SetMaterial(0,10,0); + room.SetMaterial(19,10,0); + room.AddTextBox("{BIG} {000,255,000} SHORTCUT", + 172, 6*32, 400); + } + + int[] list1 = {24,25,26,1,2,3,4,5}; + LinkRoomsHorizontally(list1); + LinkRoomsUpDown(5,6); + LinkRoomsUpDown(6,7); + int[] list2 = {7,8,9,10}; + LinkRoomsHorizontally(list2); + int[] list3 = {10,11,12,13}; + LinkRoomsVertically(list3); + int[] list4 = {19,17,16,15,14,13}; + LinkRoomsHorizontally(list4); + LinkRoomsUpDown(9,15); + LinkRoomsUpDown(18,17); + LinkRoomsUpDown(20,19); + int[] list5 = {23,22,21,20}; + LinkRoomsHorizontally(list5); + LinkRoomsUpDown(24,23); + + gameCursor = new GameCursor(9*28+14,8*32+16,(Room) rooms.elementAt(1)); + solderingPen = new SolderingPen(); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/ROTutB.java b/src/com/droidquest/levels/ROTutB.java new file mode 100644 index 0000000..c48836c --- /dev/null +++ b/src/com/droidquest/levels/ROTutB.java @@ -0,0 +1,435 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.PortDevice; +import com.droidquest.devices.Thruster; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class ROTutB extends Level +{ +public ROTutB(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 3, Orange Wall + materials.addElement(new Material(new Color(255,128,0),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 6, Portal to Tutorial C; + materials.addElement(new Portal("ROTutC.lvl",false, true)); + // Material 7, Portal to Main Menu; + materials.addElement(new Portal("MainMenu.lvl",false, true)); + + for (int a=0; a<26; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,2); + room.AddTextBox("Circuits are made of wires connected to INPUTS and OUTPUTS. Circuits make robots move, grab objects, and send signals.", + 2*28, 2*32, 500); + room.AddTextBox("Press S to use the Solderpen to connect an INPUT to an OUTPUT.", + 2*28, 4*32, 500); + room.AddTextBox("Press C to become the Cursor again.", + 2*28, 6*32, 500); + room.AddTextBox("Use SPACEBAR or RIGHT BUTTON to connect or disconnect wires from INPUTS or OUTPUTS when soldering.", + 2*28, 8*32, 500); + room.AddTextBox("To continue, press RETURN", + 5*28, 11*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,5,19,7,0); + room.SetMaterial(0,10,0); + room.AddTextBox("{BIG} ROBOT WIRING", 4*28, 2*32, 500); + room.AddTextBox("The robots in the Robotropolis Sewer are prewired to work for you. In the subway and higher levels of Robotropolis you need to change the wiring.", + 2*28, 4*32, 500); + room.AddTextBox("Here you will find out how to wire a robot.", + 2*28, 8*32, 500); + room.AddArrow(559,6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Circuit basics + Room room = (Room) rooms.elementAt(2); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("The wiring inside a robot makes it move, pick up objects, and send signals. This wiring is called a CIRCUIT.", + 2*28, 2*32, 500); + room.AddTextBox("To create a circuit in a robot you solder wires to the INPUTS and OUTPUTS of various robot parts.", + 2*28, 5*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 3, Input & Scanner + Room room = (Room) rooms.elementAt(3); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,0,3,3,1); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("This is an INPUT. Go inside Scanner and look for all the INPUTS. You will see them on the four thrusters, the grabber control, and the antenna control.", + 5*28, 2*32, 375); + room.AddTextBox("Take Scanner with you.", + 5*28, 7*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new BlueRobot(9*28, 8*32, room)); + PortDevice pd=new PortDevice(2*28-8,24,room, 24, Port.TYPE_INPUT); + items.addElement(pd); + pd.rotate(1); pd.rotate(1); + } + { // Room 4, Output + Room room = (Room) rooms.elementAt(4); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,0,3,3,1); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("This is an OUTPUT. Inside the robot you will see outputs on the graber control, the four bumpers, and the antenna control. When a robot part is activated, electricity flows OUT of it's OUTPUT.", + 5*28, 2*32, 400); + room.AddTextBox("Take Scanner with you.", + 5*28, 8*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + PortDevice pd=new PortDevice(2*28-8,24,room, 24, Port.TYPE_OUTPUT); + items.addElement(pd); + pd.rotate(1); pd.rotate(1); + } + { // Room 5, First demo + Room room = (Room) rooms.elementAt(5); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(7,11,10,11,0); + room.SetMaterial(19,10,0); + room.AddTextBox("Move Scanner so one bumper just touches a wall. (Be sure the Remote Control is on.) The robot squawks and the outside bumper turns orange. Go inside and look at the output for that bumper. It is also orange. Electricity is flowing OUT of it's OUTPUT.", + 2*28, 2*32, 450); + room.AddTextBox("Leave Scanner here.", + 2*28, 8*32, 500); + room.AddArrow(9*28,383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 6, Solderpen + Room room = (Room) rooms.elementAt(6); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,0,5,3,1); + room.SetMaterialOutline(7,0,10,0,0); + room.SetMaterialOutline(5,11,8,11,0); + room.AddTextBox("The Solderpen is used to wire OUTPUTS to INPUTS.", + 11*28, 2*32, 230); + room.AddTextBox("Press S to become the Solderpen.", + 11*28, 6*32, 230); + room.AddArrow(7*28,383, Arrow.DIR_DOWN, 28, Color.white); + SolderingPen sp = new SolderingPen(); + sp.x = 3*28+14; + sp.y = 32+16; + sp.room = room; + items.addElement(sp); + room.AddTextBox("TIP", 1*28, 2*32+10, 200); + room.AddArrow(3*28+12,2*32+4,Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 7, Attach wires + Room room = (Room) rooms.elementAt(7); + int[][] table = { + {1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0} + }; + room.RoomArray = table; + room.AddTextBox("Move the Solderpen to the INPUT until the tip glows orange.", + 2*28, 2*32, 400); + room.AddTextBox("Press Spacebar or RIGHT BUTTON to begin soldering. Move the Solderpen to the OUTPUT. (A wire will follow you.) When the tip glows orange press SPACEBAR to conenct the wire.", + 2*28, 7*32, 400); + room.AddArrow(0, 3*32+16, Arrow.DIR_LEFT, 28, Color.white); + items.addElement(new Thruster(17*28, 9*32, room, Port.ROT_RIGHT, Color.blue)); + PortDevice pd = new PortDevice(15*28, 10*32, room, 28, Port.TYPE_OUTPUT); + pd.value=true; + items.addElement(pd); + } + { // Room 8, Detatch wires + Room room = (Room) rooms.elementAt(8); + int[][] table = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, + {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0} + }; + room.RoomArray = table; + room.AddTextBox("It's easy to disconnect a wire.", + 2*28, 2*32, 400); + room.AddTextBox("Move the tip of the Solderpen to either the INPUT or OUTPUT. Press the SPACEBAR when the tip glows green.", + 2*28, 8*32, 350); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white); + Thruster thruster = new Thruster(17*28, 9*32, room, Port.ROT_RIGHT, Color.blue); + items.addElement(thruster); + PortDevice pd = new PortDevice(15*28, 10*32, room, 28, Port.TYPE_OUTPUT); + pd.value=true; + items.addElement(pd); + Wire wire = new Wire(thruster.ports[0], pd.ports[0]); + } + { // Room 9, Sparky + Room room = (Room) rooms.elementAt(9); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,4,19,6,0); + room.SetMaterialOutline(8,11,11,11,0); + room.AddTextBox("Now you are ready to create a circuit in a robot. Press C to use the cursor again.", + 2*28, 2*32, 500); + room.AddTextBox("Take Sparky with you through the next few rooms to make a wall-hugging robot.", + 2*28, 8*32, 300); + room.AddArrow(10*28,383, Arrow.DIR_DOWN, 28, Color.white); + OrangeRobot robot = new OrangeRobot(14*28,8*32,room); + robot.charge = 100000; + robot.thrusterPower = true; + robot.InternalRoom.AddTextBox("A",3*28,8*32,100); + robot.InternalRoom.AddTextBox("B",6*28,11*32,100); + robot.InternalRoom.AddTextBox("C",14*28,11*32,100); + robot.InternalRoom.AddTextBox("D",16*28,8*32,100); + robot.InternalRoom.AddTextBox("E",16*28,5*32,100); + robot.InternalRoom.AddTextBox("F",15*28,2*32,100); + robot.InternalRoom.AddTextBox("G",7*28,2*32,100); + robot.InternalRoom.AddTextBox("H",3*28,5*32,100); + items.addElement(robot); + } + { // Room 10, A to B + Room room = (Room) rooms.elementAt(10); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(8,0,11,0,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("Press S to use the Solderpen again.", + 2*28, 2*32, 300); + room.AddTextBox("Go inside Sparky and connect the left thruster (marked A) to the bottom bumper (marked B). Be sure the Remote Control and the robot thruster switch are on.", + 2*28, 6*32, 300); + room.AddArrow(17*28,383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 11, First test + Room room = (Room) rooms.elementAt(11); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("Place Sparky next to the bottom wall so it's bumper just touches the wall. When the bumper touches the wall, electricity flows from the bumper to the thruster, propelling the robot.", + 2*28, 2*32, 300); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 12, Continuing + Room room = (Room) rooms.elementAt(12); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("When the left thruster is on, Sparky moves to the right. The thruster pushes the robot in the opposite direction.", + 2*28, 2*32, 500); + room.AddTextBox("What will happen when the right thruster is on?", + 2*28, 5*32, 450); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 13, C to D + Room room = (Room) rooms.elementAt(13); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(15,0,18,0,0); + room.AddTextBox("Sparky stops at the right wall. To make Sparky move up, connect a wire between the bottom thruster (C) and the right bumper (D). Now since Sparky is touching the right wall, electricity flows into the bottom thruster and Sparky moves up.", + 2*28, 2*32, 300); + room.AddArrow(17*28,0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 14, Flipping wires + Room room = (Room) rooms.elementAt(14); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(14,4,19,4,1); + room.SetMaterialOutline(15,11,18,11,0); + room.SetMaterialOutline(19,1,19,3,0); + room.AddTextBox("The wire between C and D is hard to see. Move the Solderpen over the INPUT or OUTPUT until the tip turns green. Press F. This will flip the wire so it will be easier to see.", + 2*28, 2*32, 300); + room.AddArrow(559,2*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 15, E to F, H to G + Room room = (Room) rooms.elementAt(15); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(12,6,19,11,1); + room.SetMaterialOutline(0,1,0,3,0); + room.SetMaterialOutline(5,0,8,0,0); + room.SetMaterial(12,10,0); + room.AddTextBox("Now go back inside Sparky and connect E to F and H to G. Put Sparky in the small chamber so one bumper touches a wall and watch it go!", + 9*28, 2*32, 300); + room.AddTextBox("You have just created you first robot circuit!", + 2*28, 8*32, 200); + room.AddArrow(7*28,0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 16, Clockwise? + Room room = (Room) rooms.elementAt(16); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(12,6,19,11,1); + room.SetMaterial(12,10,0); + room.SetMaterialOutline(5,11,8,11,0); + room.SetMaterialOutline(6,0,9,0,0); + room.SetMaterialOutline(19,3,19,4,0); + room.AddTextBox("Sparky moves counter- clockwise.", + 2*28, 2*32, 200); + room.AddTextBox("Can you rewire it to go clockwise instead?", + 2*28, 5*32, 200); + room.AddTextBox("Leave Sparky here when you are done.", + 2*28, 9*32, 200); + room.AddTextBox("SOLUTION", + 15*28, 4*32+8, 300); + room.AddArrow(8*28,0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(559,4*32, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 17, Clockwise solution + Room room = (Room) rooms.elementAt(17); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,3,0,4,0); + room.AddTextBox("To make a clockwise wall-hugging robot, connect A to F, D to G, E to B, and H to C.", + 4*28, 4*32, 400); + } + { // Room 18, Checkers + Room room = (Room) rooms.elementAt(18); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(6,11,9,11,0); + room.SetMaterialOutline(13,0,16,0,0); + room.AddTextBox("Robot can signal other robots with their antennas. Connect a wire from Checker's left bumper (A) to it's antenna INPUT (B).", + 2*28, 2*32, 300); + room.AddTextBox("Take Checkers with you.", + 11*28, 10*32, 200); + room.AddArrow(15*28,0, Arrow.DIR_UP, 28, Color.white); + WhiteRobot robot = new WhiteRobot(3*28,9*32,room); + items.addElement(robot); + robot.charge = 100000; + robot.InternalRoom.AddTextBox("A",3*28,5*32,100); + robot.InternalRoom.AddTextBox("B",4*28,4*32,100); + } + { // Room 19, X marks the spot + Room room = (Room) rooms.elementAt(19); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(13,11,16,11,0); + room.SetMaterialOutline(19,7,19,9,0); + room.SetMaterial(1,0,0); + room.AddTextBox("Take the short cut and bring back Scanner. Connect a wire from Scanner's antenna OUTPUT to one of it's thrusters.", + 4*28, 3*32, 450); + room.AddTextBox("Now bump Checkers into the wall on the left and watch Scanner move! Put Scanner on the X and take Checkers with you.", + 4*28, 6*32, 450); + room.AddTextBox("SHORT CUT", + 2*28, 2*32, 300); + room.AddTextBox("{BIG} {000,255,000} X", + 7*28, 9*32, 300); + room.AddArrow(559,8*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(28+14,32, Arrow.DIR_UP, 28, Color.white); + } + { // Room 20, Shortcut + Room room = (Room) rooms.elementAt(20); + room.SetMaterialFill(0,0,19,11,5); + room.SetMaterial(0,10,0); + room.SetMaterial(1,10,0); + room.SetMaterial(1,11,0); + } + { // Room 21, Antenna talk + Room room = (Room) rooms.elementAt(21); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,7,0,9,0); + room.SetMaterialOutline(8,11,11,11,0); + room.AddTextBox("An antenna signal is tranmitted to all the robots at once, even if they aren't in the same room. Bump Checkers into the left wall again so the antenna beeps. Then look back into the previous room. Scanner is no longer on the X.", + 2*28, 2*32, 450); + room.AddArrow(10*28,383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 22, more radio talk + Room room = (Room) rooms.elementAt(22); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(8,0,11,0,0); + room.SetMaterialOutline(19,7,19,9,0); + room.AddTextBox("Robot radios have only one channel. That means that if all the robots try to send signals at once, only one robot's signal gets through.", + 2*28, 5*32, 400); + room.AddArrow(559,8*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 23, End of tutorial + Room room = (Room) rooms.elementAt(23); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,7,0,9,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("Now you know the basics of wiring circuits in robots. Before returning to Robotropolis, we suggest you learn how to use Sensors and parts from the Toolkit to make some useful robot circuits.", + 2*28, 2*32, 500); + } + { // Room 24, Portals + Room room = (Room) rooms.elementAt(24); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterial(19,10,0); + room.SetMaterial(4,2,6); + room.SetMaterial(4,5,7); + room.AddTextBox("Learn about Robot Wiring", + 5*28, 3*32, 400); + room.AddTextBox("Return to the Main Menu", + 5*28, 6*32, 400); + } + { // Room 25, Shortcut to beginning + Room room = (Room) rooms.elementAt(25); + room.SetMaterialOutline(0,0,19,9,1); + room.SetMaterialOutline(0,11,19,11,1); + room.SetMaterial(0,10,0); + room.SetMaterial(19,10,0); + room.AddTextBox("{BIG} {000,255,000} SHORTCUT", + 172, 6*32, 400); + } + + + int[] list1 = {22,23,24,25,1,2,3,4,5,20}; + LinkRoomsHorizontally(list1); + LinkRoomsUpDown(5,6); + LinkRoomsUpDown(6,7); + LinkRoomsLeftRight(8,7); + LinkRoomsLeftRight(9,8); + LinkRoomsUpDown(9,10); + LinkRoomsUpDown(10,11); + LinkRoomsLeftRight(11,12); + LinkRoomsLeftRight(12,13); + LinkRoomsUpDown(14,13); + LinkRoomsLeftRight(14,15); + int[] list2 = {20,19,18,16,15}; + LinkRoomsVertically(list2); + LinkRoomsLeftRight(16,17); + LinkRoomsLeftRight(19,21); + LinkRoomsUpDown(21,22); + + + gameCursor = new GameCursor(9*28+14,9*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} \ No newline at end of file diff --git a/src/com/droidquest/levels/ROTutC.java b/src/com/droidquest/levels/ROTutC.java new file mode 100644 index 0000000..c15252a --- /dev/null +++ b/src/com/droidquest/levels/ROTutC.java @@ -0,0 +1,371 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.GameCursor; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.RoomSensor; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Crystal; +import com.droidquest.items.Square; +import com.droidquest.items.Token; +import com.droidquest.items.Triangle; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; +import com.droidquest.materials.ShapeEditor; + +class ROTutC extends Level +{ +public ROTutC(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 3, Orange Wall + materials.addElement(new Material(new Color(255,128,0),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 6, Dark Blue Wall + materials.addElement(new Material(new Color(0,0,128),false, true)); + // Material 7, Shape Editor + materials.addElement(new ShapeEditor(new Square(0,0,null,Color.white))); + // Material 8, Portal to next Tutorial + materials.addElement(new Portal("ROTutD.lvl",false, true)); + // Material 9, Portal to Innovation Lab + materials.addElement(new Portal("ROLab.lvl",false, true)); + // Material 10, Portal to Main Menu + materials.addElement(new Portal("MainMenu.lvl",false, true)); + + for (int a=0; a<22; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,2); + room.AddTextBox("CONTACT SENSORS detect objects that touch the sensor, or the robot containing the sensor.", + 2*28, 2*32, 500); + room.AddTextBox("IN-SAME-ROOM SENSORS detect objects that are in the same room.", + 2*28, 4*32, 500); + room.AddTextBox("DIRECTIONAL SENSORS point to the direction of an object.", + 2*28, 5*32+16, 500); + room.AddTextBox("For a sensor to detect an object:", + 2*28, 7*32, 500); + room.AddTextBox("1) The Remote Control must be on.", + 2*28, 8*32, 500); + room.AddTextBox("2) The shapes must match.", + 2*28, 9*32, 500); + room.AddTextBox("3) The object must not be held by the cursor or a robot.", + 2*28, 10*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,6,19,8,0); + room.SetMaterial(0,10,0); + room.AddTextBox("{BIG} SENSORS", 7*28, 2*32, 500); + room.AddTextBox("Sometimes in Robotropolis you will want your robot to detect certain objects. For example you might want your robot to \"home in\" on an energy crystal and pick it up for you.", + 2*28, 4*32, 500); + room.AddTextBox("Robots use special detectors called SENSORS to locate objects. You'll learn about them here.", + 4*28, 8*32, 400); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Intro of all three + Room room = (Room) rooms.elementAt(2); + room.SetMaterialOutline(0,0,19,5,5); + room.SetMaterialOutline(0,9,19,11,5); + room.SetMaterialOutline(1,9,18,10,0); + room.AddTextBox("Directional", + 28+14, 5*32-8, 500); + room.AddTextBox("In-Same-Room", + 8*28, 5*32-8, 500); + room.AddTextBox("Contact", + 15*28, 5*32-8, 500); + room.AddTextBox("There are three types of sensors in Robotropolis. The sensors will help you and the robots find various objects.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new DirectionalSensor(2*28,1*32,room, + new Crystal(0,0,null,0))); + items.addElement(new RoomSensor(9*28,2*32,room, + new Crystal(0,0,null,0))); + items.addElement(new ContactSensor(15*28,2*32,room, + new Crystal(0,0,null,0))); + } + { // Room 3, Contact Sensor + Room room = (Room) rooms.elementAt(3); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,6,19,8,0); + room.AddTextBox("This is a CONTACT sensor. It detects objects that touch it.", + 2*28, 2*32, 420); + room.AddTextBox("Place the energy crystal on the sensor. What happens when you let go?", + 2*28, 4*32, 400); + room.AddTextBox("Sensors only detect objects that are NOT be held. Take the sensor with you.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new ContactSensor(16*28,3*32,room, + new Crystal(0,0,null,0))); + items.addElement(new Crystal(10*28,6*32,room,100000)); + } + { // Room 4, Scanner + Room room = (Room) rooms.elementAt(4); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,6,19,8,0); + room.AddTextBox("Carry the sensor into Scanner. Connect a wire from the sensor output to the antenna input. Come back outside.", + 2*28, 2*32, 350); + room.AddTextBox("Drop the crystal on Scanner's body. When a CONTACT sensor is inside a robot, it detects objects that touch the robot's body. Take Scanner with you.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new Crystal(10*28,6*32,room,100000)); + items.addElement(new BlueRobot(16*28,2*32,room)); + } + { // Room 5, Contact talk + Room room = (Room) rooms.elementAt(5); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,6,19,8,0); + room.AddTextBox("This CONTACT sensor is on because the crystal is touching it. Turn the Remote Control off to freeze electricity. Move the crystal. The sensors work only if the Remote Control is on. Drop the crystal on Scanner's body.", + 2*28, 2*32, 500); + room.AddTextBox("Turn the Remote Control on and off. Electricity in the sensor inside Scanner is frozen unless the Remote Control is on. Take Scanner with you.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new ContactSensor(10*28+8,6*32,room, + new Crystal(0,0,null,0))); + items.addElement(new Crystal(10*28,6*32,room,100000)); + } + { // Room 6, Triangle Contact + Room room = (Room) rooms.elementAt(6); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("This CONTACT sensor is shaped like a triangle. It detects triangles that touch it. Sensors detect objects that detect the object shape.", + 2*28, 2*32, 300); + room.AddTextBox("Can you rewire Scanner to beep when a triangle touches it? Leave Scanner here.", + 2*28, 9*32, 500); + room.AddArrow(17*28,383, Arrow.DIR_DOWN, 28, Color.white) ; + items.addElement(new Triangle(15*28,5*32,room,Color.blue)); + items.addElement(new ContactSensor(14*28,2*32,room, + new Triangle(0,0,null,Color.white))); + } + { // Room 7, Room Sensor + Room room = (Room) rooms.elementAt(7); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(0,5,0,7,0); + room.AddTextBox("This is an IN-SAME-ROOM sensor. It detects objects in the same room with it. Since this sensor has a square shape, it detects squares.", + 2*28, 2*32, 400); + room.AddTextBox("It is on now because there is a square in the room. Take the sensor with you into the next room.", + 2*28, 9*32, 500); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white); + items.addElement(new Square(5*28,6*32,room,Color.blue)); + items.addElement(new RoomSensor(14*28, 6*32, room, + new Square(0,0,null,Color.white))); + } + { // Room 8, Carrying items + Room room = (Room) rooms.elementAt(8); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,5,19,7,0); + room.AddTextBox("Now the sensor is off, since there is no square in the room. Go back and bring the square into this room. Drop the sqaure. Now the sensor comes on.", + 2*28, 2*32, 450); + room.AddTextBox("(Remember that sensors can't detect an object you are holding.) Take the sensor with you.", + 2*28, 9*32, 500); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 9, Checkers + Room room = (Room) rooms.elementAt(9); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,5,19,7,0); + room.SetMaterialOutline(1,11,4,11,0); + room.AddTextBox("Put the sensor inside Checkers and wire it to the antenna. Now go back and get the square. Checkers will beep when you drop the square. When an IN-SAME-ROOM sensor is inside a robot, it detects objects in the same room as the robot.", + 2*28, 2*32, 500); + room.AddTextBox("Take Checkers with you.", + 7*28, 10*32, 500); + room.AddArrow(3*28,383, Arrow.DIR_DOWN, 28, Color.white); + WhiteRobot robot = new WhiteRobot(10*28,7*32,room); + robot.InternalRoom.AddTextBox("A",16*28,4*32,100); + items.addElement(robot); + } + { // Room 10, Directional Sensor + Room room = (Room) rooms.elementAt(10); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(0,4,0,6,0); + room.AddTextBox("This is a DIRECTONAL sensor. It detects the direction of an object in the same room.", + 5*28, 2*32, 300); + room.AddTextBox("Pick up the sensor. Move it around the token. Outputs pointing in the DIRECTION of the token turn on. Put the sensor and the token inside Checkers and carry the robot with you.", + 2*28, 8*32, 500); + room.AddArrow(0, 5*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + items.addElement(new Token(8*28, 5*32, room)); + items.addElement(new DirectionalSensor(15*28,1*32,room, + new Token(0,0,null))); + } + { // Room 11, Movement + Room room = (Room) rooms.elementAt(11); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,4,19,6,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("You can use the DIRECTIONAL sensor to make Checkers \"home in\" on the token. Go inside Checkers and connect a wire from the robot's right thruster (A) to the left pointing output of the sensor.", + 2*28, 2*32, 450); + room.AddTextBox("Take the token out of Checkers and drop it left of the robot. Checkers moves left until it is even with the token. Take Checkers with you.", + 5*28, 8*32, 400); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white) ; + } + { // Room 12, Complete Movement + Room room = (Room) rooms.elementAt(12); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(1,11,4,11,0); + room.AddTextBox("Complete the wiring as follows: Left thruster to the right pointing sensor output, top thruster to the bottom output, bottom thruster to the top output.", + 2*28, 2*32, 500); + room.AddTextBox("Experiment by dropping the token in various parts of the room. Watch Checkers home in on it. Put the token inside Checkers and take the robot with you.", + 2*28, 6*32, 500); + room.AddArrow(3*28,383, Arrow.DIR_DOWN, 28, Color.white) ; + } + { // Room 13, Intro to complex behavior + Room room = (Room) rooms.elementAt(13); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("Now you'll see how to use the homing robot circuit to grab an object. First you need to activate the grabber. Use the IN-SAME-ROOM sensor inside Checkers. First disconnect the sensor from the antenna, and then wire the sensor to the grabber control input.", + 5*28, 2*32, 350); + room.AddTextBox("Take Checkers with you.", + 5*28, 10*32, 500); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 14, Square + Room room = (Room) rooms.elementAt(14); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("Because there is a square in this room, The grabber control is on. (Look inside Chekcers to see.)", + 2*28, 2*32, 300); + room.AddTextBox("Now bring the token outside of Checkers. Checkers will home in on it and grab it. Take Checkers into the next room.", + 2*28, 6*32, 300); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + items.addElement(new Square(17*28,2*32,room,new Color(255,128,0))); + } + { // Room 15, Questions + Room room = (Room) rooms.elementAt(15); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(19,5,19,7,0); + room.AddTextBox("What happened when Checkers came into this room? Since there is no square in this room, the sensor connected to the grabber control turned off, and Checkers dropped the token.", + 2*28, 2*32, 500); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 16, Carrying + Room room = (Room) rooms.elementAt(16); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("This DIRECTIONAL sensor is pointing toward the triangle. Since there is a square in the room, Checker's grabber is on. Let Checkers grab the triangle.", + 2*28, 2*32, 500); + room.AddTextBox("Now the DIRECTIONAL sensor is off. Sensors can't detect an object that a robot is holding. Take the sensor with you.", + 2*28, 9*32, 500); + room.AddArrow(17*28,383, Arrow.DIR_DOWN, 28, Color.white); + items.addElement(new Square(18*28,1*32,room,new Color(255,128,0))); + items.addElement(new DirectionalSensor(14*28,4*32,room, + new Triangle(0,0,null,Color.white))); + items.addElement(new Triangle(10*28,6*32,room,new Color(255,128,0))); + } + { // Room 17, Sensor Editor + Room room = (Room) rooms.elementAt(17); + room.SetMaterialOutline(0,0,19,11,4); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterial(3,2,7); + room.AddTextBox("This is a SHAPE EDITOR. Use it to change the shape of an object.", + 6*28, 2*32, 300); + room.AddTextBox("Pass the DIRECTIONAL sensor over it to change it from a triangle sensor to a square sensor.", + 2*28, 4*32, 400); + room.AddTextBox("You can verify that it senses squares by taking it to the previous room. There is a sensor editor in the Town of Robotropolis, and there are several in the Innovation Lab.", + 2*28, 7*32+16, 450); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 18, Sensor summary + Room room = (Room) rooms.elementAt(18); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("Sensors are very useful. There are just three things to remember about them.", + 2*28, 2*32, 500); + room.AddTextBox("1. Sensors can't detect an object that you or the robot are holding.", + 2*28, 4*32, 500); + room.AddTextBox("2. The object must have the same shape as the sensor to be detected.", + 2*28, 6*32, 500); + room.AddTextBox("3. The Remote Control must be on.", + 2*28, 8*32, 500); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 19, Last + Room room = (Room) rooms.elementAt(19); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("There are a lot of sensors and shape editors in the Innovation Lab. You might want to go there and just experiment with the sensors.", + 2*28, 2*32, 500); + room.AddTextBox("Before you continue in Robotropolis you will find it helpful to learn about the Toolkit and some Robot Circuits. Then you'll be ready for hours of fun in the Subway and Town.", + 2*28, 5*32, 500); + } + { // Room 20, Exit + Room room = (Room) rooms.elementAt(20); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterial(19,10,0); + room.SetMaterial(4,2,8); + room.SetMaterial(4,5,9); + room.SetMaterial(4,8,10); + room.AddTextBox("Learn about the ToolKit", + 5*28, 3*32, 500); + room.AddTextBox("Explore the Innovation Lab", + 5*28, 6*32, 500); + room.AddTextBox("Return to the Main Menu", + 5*28, 9*32, 500); + } + { // Room 21, Shortcut to beginning + Room room = (Room) rooms.elementAt(21); + room.SetMaterialOutline(0,0,19,9,1); + room.SetMaterialOutline(0,11,19,11,1); + room.SetMaterial(0,10,0); + room.SetMaterial(19,10,0); + room.AddTextBox("{BIG} {000,255,000} SHORTCUT", + 172, 6*32, 400); + } + + int[] list1 = {17,18,19,20,21,1,2,3,4,5,6}; + LinkRoomsHorizontally(list1); + LinkRoomsUpDown(6,7); + LinkRoomsLeftRight(8,7); + LinkRoomsLeftRight(9,8); + LinkRoomsUpDown(9,10); + LinkRoomsLeftRight(11,10); + LinkRoomsLeftRight(12,11); + LinkRoomsUpDown(12,13); + LinkRoomsLeftRight(13,14); + LinkRoomsLeftRight(14,15); + LinkRoomsLeftRight(15,16); + LinkRoomsUpDown(16,17); + + gameCursor = new GameCursor(17*28+14,6*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/ROTutD.java b/src/com/droidquest/levels/ROTutD.java new file mode 100644 index 0000000..12b108c --- /dev/null +++ b/src/com/droidquest/levels/ROTutD.java @@ -0,0 +1,740 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.LabCursor; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.chipstuff.Port; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.ANDGate; +import com.droidquest.devices.Antenna; +import com.droidquest.devices.ContactSensor; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.NOTGate; +import com.droidquest.devices.Node; +import com.droidquest.devices.ORGate; +import com.droidquest.devices.RoomSensor; +import com.droidquest.devices.Thruster; +import com.droidquest.devices.XORGate; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Crystal; +import com.droidquest.items.Key; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.SentryT2; +import com.droidquest.items.ToolBox; +import com.droidquest.materials.Material; +import com.droidquest.materials.Portal; + +class ROTutD extends Level +{ +public ROTutD(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 3, Orange Wall + materials.addElement(new Material(new Color(255,128,0),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 6, Dark Blue Wall + materials.addElement(new Material(new Color(0,0,128),false, true)); + // Material 7, Portal to next Tutorial + materials.addElement(new Portal("ROTutE.lvl",false, true)); + // Material 8, Portal to Main Menu + materials.addElement(new Portal("MainMenu.lvl",false, true)); + + for (int a=0; a<31; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,2); + room.AddTextBox("SPECIAL KEYS", + 7*28, 2*32, 500); + room.AddTextBox("H", + 2*28, 4*32, 100); + room.AddTextBox("Make the Cursor \"hot\" with electricity or cold again. use it to test circuits.", + 3*28, 4*32, 450); + room.AddTextBox("T", + 2*28, 7*32, 400); + room.AddTextBox("Summon Toolkit to you room. Open/Close Toolkit in room.", + 3*28, 7*32, 450); + room.AddTextBox("To continue, press RETURN.", + 4*28, 10*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(19,6,19,8,0); + room.SetMaterial(0,10,0); + room.AddTextBox("{BIG} THE TOOLKIT", 4*28, 2*32, 500); + room.AddTextBox("With what you have learned so far, you can make robots do a lot of simple tasks. But to get through the higher levels of Robotropolis, you will need to make circuits with parts from the Toolkit.", + 2*28, 4*32, 500); + room.AddTextBox("Notice that the cursor has changed. This cursor can be made \"hot\". You'll see how soon.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Freeze Electricity + Room room = (Room) rooms.elementAt(2); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,6,19,8,0); + room.AddTextBox("This circuit was made by connecting wires between the INPUTS and OUTPUTS of two parts from the Toolkit. Use the Remote Control to stop and start the flow of electricity in the circuit.", + 2*28, 2*32, 500); + room.AddTextBox("The Remote Control starts and stops electricity both inside and outside robots.", + 2*28, 9*32, 500); + room.AddArrow(559,7*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + Node node = new Node(10*28,5*32,room, Node.TYPE_STRAIGHT); + NOTGate notgate = new NOTGate(15*28, 6*32, room); + items.addElement(node); + items.addElement(notgate); + Wire wire = new Wire(node.ports[0], notgate.ports[1]); + wire = new Wire(notgate.ports[0], node.ports[2]); + } + { // Room 3, Move parts + Room room = (Room) rooms.elementAt(3); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,6,0,8,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("It's hard to see where the wires connect in this circuit, but you can fix that. Pick up one of the parts. When you move, the wires will \"stretch\" to follow the part.", + 2*28, 2*32, 450); + room.AddTextBox("However, the wire will break if you stretch it out of the room.", + 2*28, 9*32, 350); + room.AddArrow(17*28, 559, Arrow.DIR_DOWN, 28, Color.white) ; + Node node = new Node(10*28,7*32,room, Node.TYPE_STRAIGHT); + NOTGate notgate = new NOTGate(15*28, 6*32, room); + items.addElement(node); + items.addElement(notgate); + Wire wire = new Wire(node.ports[0], notgate.ports[1]); + wire = new Wire(notgate.ports[0], node.ports[2]); + } + { // Room 4, Toolkit + Room room = (Room) rooms.elementAt(4); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("This is the TOOLKIT. Inside are parts you need to wire circuits.", + 2*28, 2*32, 300); + room.AddTextBox("Take the Toolkit into the next room.", + 2*28, 5*32, 300); + room.AddArrow(0,9*32+16, Arrow.DIR_LEFT, 28, Color.white); + toolbox = new ToolBox(16*28, 9*32, room); + items.addElement(toolbox); + } + { // Room 5, Open & close + Room room = (Room) rooms.elementAt(5); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(1,11,3,11,0); + room.AddTextBox("You can open and close the Toolkit by pressing T. Try it a few times.", + 2*28, 2*32, 500); + room.AddTextBox("Leave the Toolkit here.", + 2*28, 4*32, 300); + room.AddTextBox("Drop Toolkit here.", + 2*28, 7*32, 200); + room.AddArrow(2*28+14, 383, Arrow.DIR_DOWN, 28, Color.white); + room.AddArrow(7*28,8*32, Arrow.DIR_RIGHT, 56, Color.white); + } + { // Room 6, Toolkit Sentry + Room room = (Room) rooms.elementAt(6); + int[][] table = { + {3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3}, + {3,0,0,0,0,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3}, + {3,0,0,3,3,3,3,3,3,0,0,3,3,3,3,3,3,0,0,0}, + {3,0,0,3,3,3,3,3,3,0,0,3,3,0,0,3,3,0,0,0}, + {3,0,0,0,0,0,0,3,3,0,0,3,3,0,0,3,3,0,0,0}, + {3,0,0,0,0,0,0,3,3,0,0,3,3,0,0,3,3,0,0,0}, + {3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,3,3,0,0,3}, + {3,0,0,3,3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,3}, + {3,0,0,3,3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,3}, + {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + room.RoomArray = table; + room.AddTextBox("NO TOOLKITS ALLOWED!", + 2*28, 2*32, 150); + room.AddArrow(559, 6*32, Arrow.DIR_RIGHT, 28, Color.white); + items.add(new SentryT2(2*28, 2*32, room)); + } + { // Room 7, Summon + Room room = (Room) rooms.elementAt(7); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,4,0,7,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("If the Toolkit is nowhere in sight, you can summon it to you. (Think of it as sitting in your pocket wherever you go.)", + 2*28, 2*32, 500); + room.AddTextBox("Press T to summon the Toolkit. Drop it and press T to open and close it.", + 2*28, 9*32, 400); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 8, Objects in Toolkit + Room room = (Room) rooms.elementAt(8); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("You can take parts in and out of the Toolkit with the cursor.", + 2*28, 2*32, 500); + room.AddTextBox("To take a part out, move on top of it and press the SPACEBAR. To put it back, drop it anywhere in the Toolkit.", + 2*28, 5*32, 500); + room.AddTextBox("Open Toolkit here.", + 3*28, 9*32, 100); + room.AddArrow(7*28, 10*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 9, Rotating Objects + Room room = (Room) rooms.elementAt(9); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("You can rotate parts left and right by holding a part and pressing the [ and ] keys.", + 2*28, 2*32, 450); + room.AddTextBox("There is no limit to the number of parts you can take out of the Toolkit.", + 2*28, 5*32, 450); + room.AddTextBox("Open Toolkit here.", + 3*28, 9*32, 100); + room.AddArrow(7*28, 10*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 10, Hot Cursor + Room room = (Room) rooms.elementAt(10); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(1,11,4,11,0); + room.AddTextBox("The cursor here is special. It can be made \"HOT\" with electricity to test parts.", + 4*28, 2*32, 300); + room.AddTextBox("Press H to make the cursor hot.", + 4*28, 5*32, 300); + room.AddTextBox("Pass the hot cursor over the antenna INPUT to turn the antenna on.", + 5*28, 7*32, 400); + room.AddTextBox("Press H again to make the cursor cold.", + 5*28, 10*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + } + { // Room 11, Hot Cursor 2 + Room room = (Room) rooms.elementAt(11); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("You can also use the hot cursor to move a robot. Just sit on the thruster input and the robot will move.", + 5*28, 2*32, 400); + room.AddTextBox("The hot cursor is available for testing circuits in the Innovation Lab. Unfortunately you can't use it in Robotropolis. (It would spoil the game.)", + 2*28, 7*32, 400); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + OrangeRobot robot = new OrangeRobot(13*28, 4*32, room); + robot.thrusterPower = true; + items.addElement(robot); + } + { // Room 12, Crossroads intro + Room room = (Room) rooms.elementAt(12); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("The next room is called the CROSSROADS. From it you can follow various paths to learn about different parts in the Toolkit.", + 2*28, 2*32, 500); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 13, Crossroads + Room room = (Room) rooms.elementAt(13); + int[][] table = { + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,6,6,6,6,6,6,6,0,0,0,0,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table; + room.AddTextBox("{BIG} CROSSROADS", + 3*28, 4*32, 500); + room.AddTextBox("(Turn the Remote Control on.)", + 4*28, 5*32, 250); + room.AddTextBox("NODES", + 2*28, 32+16, 300); + room.AddTextBox("FLIPFLOPS", + 15*28, 32+16, 300); + room.AddTextBox("LOGIC GATES", + 16*28, 6*32, 100); + room.AddTextBox("When you have learned all about the Toolkit, go this way.", + 4*28, 9*32, 300); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(17*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(559, 6*32, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(10*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 14, Paths to Nodes & FlipFlops + Room room = (Room) rooms.elementAt(14); + int[][] table = { + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6}, + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,0,0,0,0,6} + }; + room.RoomArray = table; + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 15, Nodes Intro + Room room = (Room) rooms.elementAt(15); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("Nodes make electricity branch to two or three places.", + 2*28, 2*32, 350); + room.AddTextBox("Take a node from the Toolkit and carry it to the next room.", + 2*28, 9*32, 500); + room.AddArrow(0, 6*32+16, Arrow.DIR_LEFT, 28, Color.white); + items.addElement(new Node(13*28, 32+16, room, Node.TYPE_STRAIGHT)); + items.addElement(new Node(15*28, 32+16, room, Node.TYPE_RIGHT)); + items.addElement(new Node(17*28, 32+16, room, Node.TYPE_THREE)); + } + { // Room 16, Nodes Workshop + Room room = (Room) rooms.elementAt(16); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("Wire the INPUT (circle) of the node to the OUTPUT of the CONTACT sensor. Wire the node outputs to the thrusters.", + 2*28, 2*32, 275); + room.AddTextBox("Drop the blue key so that it touches the sensor. Electricity flows to both thrusters.", + 2*28, 9*32, 500); + items.addElement(new Key(11*28, 2*32, room, Color.white)); + items.addElement(new ContactSensor(11*28, 4*32, room, new Key(0,0,null, Color.white))); + items.addElement(new Thruster(15*28, 32+16, room, Port.ROT_UP, Color.white)); + items.addElement(new Thruster(16*28, 3*32, room, Port.ROT_RIGHT, Color.white)); + } + { // Room 17, Flipflop intro + Room room = (Room) rooms.elementAt(17); + int[][] table = { + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("A flipflop is like a light switch. It 'flips' electricity from one output to the other.", + 5*28, 2*32, 300); + room.AddTextBox("Take a flipflop from the Toolkit. Put the hot cursor on one input at a time to make the electricity 'flip' or 'flop'.", + 5*28, 6*32, 300); + items.addElement(new FlipFlop(17*28+7, 32+16, room)); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 18, Flipflop workshop + Room room = (Room) rooms.elementAt(18); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("Go inside the robot and wire the orange OUTPUT of the flipflop to the thruster on the right. Sit on the eye to see what you did.", + 5*28, 8*32, 420); + BlueRobot robot = new BlueRobot(9*28,4*32,room); + items.addElement(robot); + FlipFlop ff = new FlipFlop(10*28, 5*32, robot.InternalRoom); + items.addElement(ff); + Wire wire = new Wire(ff.ports[0], robot.devices[7].ports[0]); + wire = new Wire(ff.ports[2], robot.devices[3].ports[0]); + wire = new Wire(robot.devices[5].ports[0], ff.ports[1]); + robot.thrusterPower=true; + } + { // Room 19, Crossroads II + Room room = (Room) rooms.elementAt(19); + int[][] table = { + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table; + room.AddTextBox("Crossroads", + 2*28, 6*32+8, 500); + room.AddTextBox("NOT-gate", + 2*28, 32+16, 500); + room.AddTextBox("AND-gate", + 15*28, 2*32+16, 500); + room.AddTextBox("XOR-gate", + 15*28, 10*32, 500); + room.AddTextBox("OR-gate", + 2*28, 10*32+16, 500); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(559, 2*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + room.AddArrow(0, 6*32, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 20, NOT gate intro + Room room = (Room) rooms.elementAt(20); + int[][] table = { + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("A NOT-gate inverts electricity flow. It turns on when its INPUT is NOT on.", + 5*28, 2*32, 300); + room.AddTextBox("Take a NOT-gate from the Toolkit and use the hot cursor to see how it works.", + 5*28, 6*32, 400); + items.addElement(new NOTGate(17*28+10, 32+12, room)); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 21, NOT gate workshop + Room room = (Room) rooms.elementAt(21); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("Wire the NOT-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when the crystal is NOT touching the CONTACT sensor.", + 5*28, 8*32, 400); + items.addElement(new Crystal(3*28, 7*32, room, 100000)); + ContactSensor sensor = new ContactSensor(2*28, 6*32, room, new Crystal(0,0,null,0)); + items.addElement(sensor); + NOTGate ng = new NOTGate(4*28, 4*32, room); + items.addElement(ng); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor.ports[0], ng.ports[0]); + } + { // Room 22, OR gate intro + Room room = (Room) rooms.elementAt(22); + int[][] table = { + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5} + }; + room.RoomArray = table; + room.AddTextBox("An OR-gate turns on when one OR the other INPUT is on, or both.", + 5*28, 2*32, 300); + room.AddTextBox("Take an OR-gate from the Toolkit and use the hot cursor to see how it works.", + 2*28, 8*32, 400); + items.addElement(new ORGate(17*28+10, 32+12, room)); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 23, OR workshop + Room room = (Room) rooms.elementAt(23); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("Wire the OR-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when the key is above OR left of the sensor.", + 5*28, 10*32, 400); + items.addElement(new Key(3*28, 7*32, room, Color.blue)); + DirectionalSensor sensor = new DirectionalSensor(8*28, 6*32, room, + new Key(0,0,null,Color.white)); + items.addElement(sensor); + ORGate og = new ORGate(4*28, 4*32, room); + items.addElement(og); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor.ports[0], og.ports[1]); + wire = new Wire(sensor.ports[3], og.ports[0]); + } + { // Room 24, Paths to AND & XOR + Room room = (Room) rooms.elementAt(24); + int[][] table = { + {6,6,6,6,6,6,6,0,0,0,0,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6}, + {6,6,6,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6} + }; + room.RoomArray = table; + room.AddArrow(9*28, 0, Arrow.DIR_UP, 28, Color.white); + room.AddArrow(5*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 25, AND gate intro + Room room = (Room) rooms.elementAt(25); + int[][] table = { + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("An AND-gate turns on when its left AND right INPUTS are on.", + 5*28, 2*32, 300); + room.AddTextBox("Take a AND-gate from the Toolkit and test it with the hot cursor.", + 5*28, 6*32, 400); + items.addElement(new ANDGate(17*28+10, 32+12, room)); + room.AddArrow(3*28, 0, Arrow.DIR_UP, 28, Color.white); + } + { // Room 26, AND gate workshop + Room room = (Room) rooms.elementAt(26); + int[][] table3 = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table3; + room.AddTextBox("Wire the AND-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when the key is left AND up from this DIRECTIONAL sensor.", + 5*28, 9*32, 400); + items.addElement(new Key(3*28, 7*32, room, Color.blue)); + DirectionalSensor sensor = new DirectionalSensor(5*28, 6*32, room, + new Key(0,0,null,Color.white)); + items.addElement(sensor); + ANDGate ag = new ANDGate(4*28, 4*32, room); + items.addElement(ag); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor.ports[0], ag.ports[1]); + wire = new Wire(sensor.ports[3], ag.ports[0]); + } + { // Room 27, XOR gate intro + Room room = (Room) rooms.elementAt(27); + int[][] table = { + {5,5,5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5} + }; + room.RoomArray = table; + room.AddTextBox("An EXCLUSIVE-OR- gate (XOR-gate) turns on when one OR the other INPUT is on, NOT both.", + 7*28, 2*32, 250); + room.AddTextBox("Take an XOR-gate from the Toolkit and test it with the hot cursor.", + 2*28, 9*32, 400); + items.addElement(new XORGate(17*28+10, 32+12, room)); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 28, XOR workshop + Room room = (Room) rooms.elementAt(28); + int[][] table = { + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5}, + {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5} + }; + room.RoomArray = table; + room.AddTextBox("Wire the XOR-gate output to the Antenna INPUT.", + 5*28, 2*32, 400); + room.AddTextBox("The antenna beeps when either the key or the crystal is in the room, but not both.", + 5*28, 9*32, 400); + items.addElement(new Key(2*28, 9*32, room, Color.blue)); + items.addElement(new Crystal(2*28, 7*32, room, 100000)); + RoomSensor sensor1 = new RoomSensor(8*28, 6*32, room, new Key(0,0,null,Color.white)); + RoomSensor sensor2 = new RoomSensor(8*28, 7*32, room, new Crystal(0,0,null,0)); + sensor1.rotate(1); sensor1.rotate(1); + sensor2.rotate(1); sensor2.rotate(1); + items.addElement(sensor1); + items.addElement(sensor2); + XORGate xg = new XORGate(4*28, 4*32, room); + items.addElement(xg); + items.addElement(new Antenna(2*28, 2*32, room, Color.white)); + Wire wire = new Wire(sensor1.ports[0], xg.ports[1]); + wire = new Wire(sensor2.ports[0], xg.ports[0]); + } + { // Room 29, End + Room room = (Room) rooms.elementAt(29); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(8,0,11,0,0); + room.SetMaterial(19,10,0); + room.SetMaterial(4,7,7); + room.SetMaterial(4,9,8); + room.AddTextBox("Now you know what the parts in the Toolkit do. To find out how to make simple circuits inside robots, continue with Robot Circuits.", + 2*28, 4*32, 450); + room.AddTextBox("Learn about Robot Circuits", + 5*28, 8*32, 450); + room.AddTextBox("Return to the Main Menu", + 5*28, 10*32, 450); + } + { // Room 30, Shortcut to beginning + Room room = (Room) rooms.elementAt(30); + room.SetMaterialOutline(0,0,19,9,1); + room.SetMaterialOutline(0,11,19,11,1); + room.SetMaterial(0,10,0); + room.SetMaterial(19,10,0); + room.AddTextBox("{BIG} {000,255,000} SHORTCUT", + 172, 6*32, 400); + } + + int[] list0={29,30,1,2,3}; + LinkRoomsHorizontally(list0); + LinkRoomsUpDown(3,4); + LinkRoomsLeftRight(5,4); + LinkRoomsUpDown(5,6); + LinkRoomsLeftRight(6,7); + LinkRoomsLeftRight(7,8); + LinkRoomsLeftRight(8,9); + LinkRoomsUpDown(9,10); + LinkRoomsUpDown(10,11); + int[] list1={11,12,13,19,24}; + LinkRoomsHorizontally(list1); + int[] list2={18,17,14,13,29}; + LinkRoomsVertically(list2); + int[] list3={21,20,19,22,23}; + LinkRoomsVertically(list3); + int[] list4={26,25,24,27,28}; + LinkRoomsVertically(list4); + LinkRoomsLeftRight(16,15); + LinkRoomsLeftRight(15,14); + + + gameCursor = new LabCursor(17*28+14,7*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} diff --git a/src/com/droidquest/levels/ROTutE.java b/src/com/droidquest/levels/ROTutE.java new file mode 100644 index 0000000..2cfe4a2 --- /dev/null +++ b/src/com/droidquest/levels/ROTutE.java @@ -0,0 +1,355 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.Wire; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.LabCursor; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.devices.DirectionalSensor; +import com.droidquest.devices.FlipFlop; +import com.droidquest.devices.RoomSensor; +import com.droidquest.items.BlueRobot; +import com.droidquest.items.Crystal; +import com.droidquest.items.Key; +import com.droidquest.items.Sentry; +import com.droidquest.items.ToolBox; +import com.droidquest.items.Triangle; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.Material; +import com.droidquest.materials.PanicButton; +import com.droidquest.materials.Portal; + +class ROTutE extends Level +{ +public ROTutE(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 3, Orange Wall + materials.addElement(new Material(new Color(255,128,0),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 6, Dark Blue Wall + materials.addElement(new Material(new Color(0,0,128),false, true)); + // Material 7, Portal to next Tutorial + materials.addElement(new Portal("ROTutF.lvl",false, true)); + // Material 8, Portal to Main Menu + materials.addElement(new Portal("MainMenu.lvl",false, true)); + // Material 9, Panic Button #1 + materials.addElement(new PanicButton(1)); + + for (int a=0; a<23; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,2); + room.AddTextBox("If your circuit doesn't work, check to see that the Remote Control and robot thruster switch is on, and the battery still has energy", + 2*28, 2*32, 500); + room.AddTextBox("To continue, press RETURN.", + 4*28, 10*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterial(0,10,0); + room.AddTextBox("{BIG} ROBOT CIRCUITS", 3*28, 2*32, 500); + room.AddTextBox("Here you will see how to make some useful circuits inside robots. The circuits will help you get through Robotropolis, or you can go to the Lab and create your own robot challenges.", + 2*28, 4*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 2, Scanner + Room room = (Room) rooms.elementAt(2); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(19,7,19,9,0); + room.AddTextBox("This robot bounces from side to side using a \"ping-pong\" circuit. It takes one flipflop to make this circuit.", + 2*28, 4*32, 500); + room.AddTextBox("Go inside and watch electricity flow to see how it works. (Use the eye to see out as you move.)", + 2*28, 6*32, 500); + room.AddTextBox("Take Scanner with you to learn how the ping-pong circuit works.", + 2*28, 10*32, 500); + room.AddArrow(559,8*32+16, Arrow.DIR_RIGHT, 28, Color.white); + BlueRobot robot = new BlueRobot(2*28,32+16,room); + items.addElement(robot); + robot.thrusterPower = true; + FlipFlop ff = new FlipFlop(9*28,5*32,robot.InternalRoom); + items.addElement(ff); + new Wire(ff.ports[0],robot.devices[7].ports[0]); + new Wire(ff.ports[1],robot.devices[5].ports[0]); + new Wire(ff.ports[2],robot.devices[3].ports[0]); + new Wire(ff.ports[3],robot.devices[1].ports[0]); + } + { // Room 3, Ping-Pong explained + Room room = (Room) rooms.elementAt(3); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,7,0,9,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("While the left side of the flipflop is on, electricity flows to the left thruster and Scanner moves right. When Scanner hits the right wall, the right bumper turns on, sending electricity to the right side of the flipflop.", + 2*28, 2*32, 500); + room.AddTextBox("(Put Scanner here.)", + 5*28, 7*32, 500); + room.AddTextBox("Now the right thruster turns on and Scanner ping-pongs to the left.", + 2*28, 10*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 4, Disconnect FlipFlop + Room room = (Room) rooms.elementAt(4); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("Can yo make Scanner bounce up and down instead? (yo-yo circuit) First disconnect the flipflop. The fastest way to disconnect it is to pick it up and carry it outside Scanner. All the wires will break. Then bring it back inside the robot.", + 2*28, 2*32, 500); + room.AddTextBox("Take Scanner into the next room to see how to rewire it to bounce up and down.", + 2*28, 7*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 5, Wire a Yo-Yo + Room room = (Room) rooms.elementAt(5); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("Connect a wire from the left OUTPUT of the flipflop to top thruster. Connect another wire from the left INPUT of the flipflop to the top bumper. Connect the rest of the flipflop to the bottom thruster and bumper.", + 2*28, 2*32, 450); + room.AddTextBox("You just changed a ping-pong circuit to a yo-yo circuit.", + 2*28, 7*32, 500); + room.AddArrow(559,9*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + } + { // Room 6, ping-pong & yo-yo + Room room = (Room) rooms.elementAt(6); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("Can you make Scanner ping-pong and yo-yo at the same time? Take another flipflop from the toolkit.", + 2*28, 2*32, 500); + room.AddTextBox("Connect the left side of the flipflop to the left thruster and bumper, and the right side to the right thruster and bumper.", + 2*28, 6*32, 500); + room.AddArrow(17*28,383, Arrow.DIR_DOWN, 28, Color.white); + toolbox = new ToolBox(4*28, 10*32, room); + items.addElement(toolbox); + } + { // Room 7, Intro to Sentry problem + Room room = (Room) rooms.elementAt(7); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(0,9,0,10,0); + room.SetMaterialOutline(19,4,19,6,0); + room.SetMaterialOutline(2,11,5,11,0); + room.AddTextBox("How would you make a robot get a crystal from a guarded room like the one next door, bring it back, and drop it? (This is important in Robotropolis.)", + 2*28, 2*32, 350); + room.AddTextBox("One way to do this is with the parts in this next room.", + 2*28, 6*32+16, 350); + room.AddTextBox("Go and get the parts and put them inside the robot, and take them with you.", + 6*28, 9*32, 400); + room.AddTextBox("Look!", + 1*28, 10*32, 500); + room.AddArrow(4*28,383, Arrow.DIR_DOWN, 28, Color.white); + room.AddArrow(0,10*32, Arrow.DIR_LEFT, 28, Color.white); + room.AddArrow(15*28,7*32, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 8, Sample Sentry + Room room = (Room) rooms.elementAt(8); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(14,0,14,3,3); + room.SetMaterialOutline(14,7,14,11,3); + room.SetMaterialOutline(17,8,19,11,3); + room.SetMaterialOutline(19,9,19,10,0); + room.AddTextBox("Blue Sentries won't let you ride past in- side a robot.", + 4*28, 3*32, 200); + items.addElement(new Crystal(6*28,9*32,room,100000)); + int[] pace = {12*28,3*32,12*28,9*32}; + int[] program = {0,0,0,0,0,0}; + items.addElement(new Sentry(0,0,room,pace,program,true)); + } + { // Room 9, Parts + Room room = (Room) rooms.elementAt(9); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,4,0,6,0); + items.addElement(new WhiteRobot(6*28, 8*32, room)); + items.addElement(new DirectionalSensor(9*28, 2*32, room, + new Crystal(0,0,null,0))); + items.addElement(new Key(15*28, 5*32, room, Color.blue)); + items.addElement(new RoomSensor(14*28, 6*32, room, + new Key(0,0,null,Color.white))); + } + { // Room 10, Break problem to pieces + Room room = (Room) rooms.elementAt(10); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(1,0,5,0,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("The best way to tackle this problem is to break it into parts. Obe part is making Checkers grab and drop objects at your command. The other part is making Checkers go into the room where the crystal is and come back to you. Let's tackle the grabber first. (Be sure the Remote Control is on and carry Checkers and all the parts inside it with you.)", + 6*28, 2*32, 350); + room.AddArrow(0,9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 11, Grabbing + Room room = (Room) rooms.elementAt(11); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(0,4,0,6,0); + room.AddTextBox("First, get a NOT-gate from the toolkit. Connect the OUTPUT of the NOT-gate to the INPUT of the grabber. Now Checkers will grab any object it touches.", + 2*28, 2*32, 500); + room.AddTextBox("Try it, by putting Checkers on top of the triangle. Now, how do you make Checkers let go? One way is to disconnect the NOT-gate. There is a better way, though.", + 2*28, 8*32, 450); + room.AddArrow(0,5*32+16, Arrow.DIR_LEFT, 28, Color.white); + items.addElement(new Triangle(12*28, 5*32, room, new Color(255,128,0))); + } + { // Room 12, Releasing + Room room = (Room) rooms.elementAt(12); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(19,4,19,6,0); + room.SetMaterialOutline(1,11,4,11,0); + room.AddTextBox("Use the key IN-SAME-ROOM sensor. Connect it to the NOT-gate. Take the key from inside Checkers and drop it in the room. Checkers will drop the triangle.", + 2*28, 2*32, 500); + room.AddTextBox("(Pick up the triangle to be sure.) Look inside Checkers. If the key is in the room, the sensor is ON, and the grabber is OFF. Put everything back in Checkers and bring Checkers with you.", + 5*28, 7*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 13, Moving + Room room = (Room) rooms.elementAt(13); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(1,0,4,11,0); + room.AddTextBox("Now you need to make Checkers go into the room and find the crystal. The robot must go up to the doorway, and then left and down to find the crystal. You have seen circuits that move both ways. Do you know what they are?", + 5*28, 2*32, 400); + room.AddTextBox("Go into the next room to find out.", + 5*28, 8*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 14, Yo-Yo + Room room = (Room) rooms.elementAt(14); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("The yo-yo circuit (flipflop to top and bottom thrusters and bumpers) will make Checkers move up. A wire from the left output of the directional sensor to the thruster on the right will make Checkers go left until it is directly above or below the crystal.", + 5*28, 2*32, 350); + room.AddTextBox("Make the circuit now.", + 5*28, 10*32, 350); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 15, Get the Crystal + Room room = (Room) rooms.elementAt(15); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,8,19,10,0); + room.SetMaterialOutline(14,11,17,11,0); + room.AddTextBox("Send Checkers in to get the crystal.", + 5*28, 2*32, 350); + room.AddTextBox("Did it work? There is a problem. After Checkers grabs the crystal, the directional sensor turns off. Checkers stops moving left and continues to bounce up and down.", + 5*28, 4*32, 350); + room.AddTextBox("How can you make Checkers return?", + 5*28, 10*32, 350); + room.AddArrow(16*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 16, Crystal room + Room room = (Room) rooms.elementAt(16); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(14,0,14,3,3); + room.SetMaterialOutline(14,7,14,11,3); + room.SetMaterialOutline(19,8,19,10,0); + items.addElement(new Crystal(6*28,9*32,room,100000)); + } + { // Room 17, How to return + Room room = (Room) rooms.elementAt(17); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(14,0,17,0,0); + room.SetMaterialOutline(1,11,4,11,0); + room.AddTextBox("Look inside Checkers. The grabber OUTPUT is now on. To make Checkers come back after it has grabbed the crystal, you need to conenct a wire from the grabber OUTPUT to the thruster on the left. Now Checkers will move right and up and down when it grabs the crystal. Try it!", + 2*28, 2*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 18, Now the test + Room room = (Room) rooms.elementAt(18); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("Now for the real thing! Try the robot circuit out in the room next door. (If Checkers gets stuck in there, press the PANIC BUTTON. The sentry will go off duty until you press the button again.", + 5*28, 2*32, 400); + room.AddTextBox("PUZZLE", + 2*28, 10*32, 350); + room.AddArrow(0, 10*32+16, Arrow.DIR_LEFT, 28, Color.white); + room.AddArrow(599, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 19, Sentry puzzle + Room room = (Room) rooms.elementAt(19); + room.SetMaterialOutline(0,0,19,11,3); + room.SetMaterialOutline(14,0,14,3,3); + room.SetMaterialOutline(14,7,14,11,3); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterial(18,1,9); + room.AddTextBox("PANIC BUTTON", 100, 15*28, 2*32); + items.addElement(new Crystal(6*28,9*32,room,100000)); + int[] pace = {12*28,3*32,12*28,9*32}; + int[] program = {0,0,15*28-1,11*32,19*28,8*32}; + items.addElement(new Sentry(0,0,room,pace,program,true)); + } + { // Room 20, Congratulations + Room room = (Room) rooms.elementAt(20); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,8,19,10,0); + room.AddTextBox("Congratulations! You solved a complex problem by breaking it down into small parts and trying each part. This is a good strategy to use in the game. You can use the Innovation Lab to test your solutions before risking robots in Robotropolis.", + 2*28, 2*32, 500); + room.AddTextBox("With what you know now you can master the Subway of Robotropolis. Then learn about Robot Teamwork.", + 2*28, 7*32, 500); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 21, Portals + Room room = (Room) rooms.elementAt(21); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterial(19,10,0); + room.SetMaterial(4,2,7); + room.SetMaterial(4,5,8); + room.AddTextBox("Learn about Robot Teamwork", + 5*28, 3*32, 500); + room.AddTextBox("Return to the Main Menu", + 5*28, 6*32, 500); + } + { // Room 22, Shortcut to beginning + Room room = (Room) rooms.elementAt(22); + room.SetMaterialOutline(0,0,19,9,5); + room.SetMaterialOutline(0,11,19,11,5); + room.SetMaterial(0,10,0); + room.SetMaterial(19,10,0); + room.AddTextBox("{BIG} {000,255,000} SHORTCUT", + 172, 6*32, 400); + } + + + int[] list1 = {19,18,20,21,22,1,2,3,4,5,6}; + LinkRoomsHorizontally(list1); + LinkRoomsLeftRight(8,7); + LinkRoomsLeftRight(7,9); + LinkRoomsUpDown(6,7); + LinkRoomsUpDown(7,10); + LinkRoomsLeftRight(11,10); + LinkRoomsLeftRight(12,11); + LinkRoomsUpDown(12,13); + LinkRoomsUpDown(13,14); + LinkRoomsLeftRight(15,14); + LinkRoomsLeftRight(16,15); + LinkRoomsUpDown(15,17); + LinkRoomsUpDown(17,18); + + gameCursor = new LabCursor(16*28+14,9*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + } + +} \ No newline at end of file diff --git a/src/com/droidquest/levels/ROTutF.java b/src/com/droidquest/levels/ROTutF.java new file mode 100644 index 0000000..57e16f6 --- /dev/null +++ b/src/com/droidquest/levels/ROTutF.java @@ -0,0 +1,379 @@ +package com.droidquest.levels; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.RoomDisplay; +import com.droidquest.avatars.HelpCam; +import com.droidquest.avatars.LabCursor; +import com.droidquest.avatars.Remote; +import com.droidquest.avatars.SolderingPen; +import com.droidquest.decorations.Arrow; +import com.droidquest.items.Crystal; +import com.droidquest.items.OrangeRobot; +import com.droidquest.items.Sentry; +import com.droidquest.items.ToolBox; +import com.droidquest.items.WhiteRobot; +import com.droidquest.materials.Material; +import com.droidquest.materials.PanicButton; +import com.droidquest.materials.Portal; +import com.droidquest.materials.Switch; + +class ROTutF extends Level +{ +public ROTutF(RoomDisplay rd) + { + super(rd); + + // Material 0, Blank + materials.addElement(new Material(true, false)); + // Material 1, LightBlue Wall + materials.addElement(new Material(new Color(192,192,255),false, true)); + // Material 2, Green Wall + materials.addElement(new Material(new Color(0,255,0),false, true)); + // Material 3, Orange Wall + materials.addElement(new Material(new Color(255,128,0),false, true)); + // Material 4, LightOrange Wall + materials.addElement(new Material(new Color(255,224,192),false, true)); + // Material 5, Blue Wall + materials.addElement(new Material(new Color(0,0,255),false, true)); + // Material 6, Dark Blue Wall + materials.addElement(new Material(new Color(0,0,128),false, true)); + // Material 7, Switch + int[][] matprogram = { + {Switch.WAIT4CONTACT}, + {Switch.SETVALUEHIGH}, + {Switch.REPLACE, 11,1,0, 11,7,5}, + {Switch.REPLACE, 11,2,0, 11,8,5}, + {Switch.REPLACE, 11,3,0, 11,9,5}, + {Switch.WAIT4REMOVAL}, + {Switch.REPLACE, 11,3,5, 11,9,0}, + {Switch.REPLACE, 11,2,5, 11,8,0}, + {Switch.REPLACE, 11,1,5, 11,7,0}, + {Switch.SETVALUELOW} + }; + materials.addElement(new Switch(Switch.ROT_UP, matprogram)); + // Material 8, Switch, another + materials.addElement(new Switch(Switch.ROT_UP, matprogram)); + // Material 9, Portal to next Tutorial + materials.addElement(new Portal("ROTut3.lvl",false, true)); + // Material 10, Portal to Main Menu + materials.addElement(new Portal("MainMenu.lvl",false, true)); + // Material 11, Panic Button #1 + materials.addElement(new PanicButton(1)); + // Material 12, Panic Button #2 + materials.addElement(new PanicButton(2)); + + for (int a=0; a<22; a++) + rooms.addElement(new Room()); + + { // Room 0, Help Screen + Room room = (Room) rooms.elementAt(0); + room.SetMaterialOutline(0,0,19,11,2); + room.AddTextBox("If your circuit doesn't work, check the state of the flipflops. If the robot doesn't go at all, check the Remote Control, thruster switch, and battery.", + 2*28, 2*32, 450); + room.AddTextBox("To continue, press RETURN.", + 4*28, 10*32, 500); + } + { // Room 1, Title Screen + Room room = (Room) rooms.elementAt(1); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(19,7,19,9,0); + room.SetMaterial(0,10,0); + room.AddTextBox("{BIG} ROBOT TEAMWORK", 3*28, 2*32, 500); + room.AddTextBox("Some of the challenges you'll encounter in Robotropolis need robot teamwork. Here you'll see how to use two robots to solve puzzles.", + 2*28, 4*32, 500); + room.AddArrow(559,8*32+16, Arrow.DIR_RIGHT, 28, Color.white) ; + toolbox = new ToolBox(3*28, 7*32, room); + items.addElement(toolbox); + } + { // Room 2, Sparky & Checkers + Room room = (Room) rooms.elementAt(2); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,7,0,9,0); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(13,11,16,11,0); + room.AddTextBox("To solve the puzzle next door, you need two robots. One robot must push the button that opens the door to the crystal. The other must get the crystal.", + 2*28, 2*32, 500); + room.AddTextBox("This sentry won't let you ride past inside a robot.", + 2*28, 5*32, 500); + room.AddTextBox("(Use the PANIC BUTTON if your robot gets stuck.)", + 2*28, 7*32, 500); + room.AddTextBox("If you want help, try the following solution.", + 2*28, 10*32, 300); + room.AddTextBox("PUZZLE", + 17*28, 10*32, 500); + room.AddArrow(559,10*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(15*28, 383, Arrow.DIR_DOWN, 28, Color.white); + items.addElement(new OrangeRobot(11*28, 8*32, room)); + items.addElement(new WhiteRobot(14*28, 8*32, room)); + } + { // Room 3, Puzzle + Room room = (Room) rooms.elementAt(3); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(11,0,19,4,5); + room.SetMaterialOutline(11,0,11,6,5); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterial(18,5,7); + room.SetMaterial(1,1,11); + room.AddTextBox("PANIC BUTTON", + 2*28, 2*32, 150); + room.AddTextBox("DOOR", + 9*28, 3*32, 200); + int[] pace = {3*28,2*32, 3*28,9*32}; + int[] program = {4*28,0,20*28,12*32, 0,9*32}; + items.addElement(new Sentry(0,0,room,pace,program,true)); + items.addElement(new Crystal(17*28, 2*32, room, 100000)); + } + { // Room 4, Divide the tasks + Room room = (Room) rooms.elementAt(4); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(13,0,17,0,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("The problem has two parts:", + 2*28, 2*32, 300); + room.AddTextBox("1. Push door button", + 2*28, 4*32, 300); + room.AddTextBox("2. Retrieve crystal", + 2*28, 5*32, 300); + room.AddTextBox("Use one robot for each task.", + 2*28, 7*32, 300); + room.AddTextBox("Put Checkers inside Sparky and take both robots with you.", + 2*28, 9*32, 300); + room.AddTextBox("SOLUTION", + 15*28+14, 11*32, 300); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 5, Assigning tasks + Room room = (Room) rooms.elementAt(5); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(19,4,19,6,0); + room.AddTextBox("Use Sparky to push the door button. You want Sparky to move right until it hits the right wall, and then up until it hits the top wall.", + 2*28, 2*32, 400); + room.AddTextBox("Sparky should stop there and stay on the button until Checkers has safely retrieved the crystal.", + 2*28, 6*32, 400); + room.AddArrow(559, 5*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 6, Sparky goes right + Room room = (Room) rooms.elementAt(6); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,4,0,6,0); + room.SetMaterialOutline(15,11,18,11,0); + room.AddTextBox("Use a flipflop and a node. Turn the Remote Control off before you start wiring.", + 2*28, 2*32, 500); + room.AddTextBox("To make Sparky go right until it hits a wall, connect the left thruster to the \"hot\" (on) side of the flipflop. Try it to see how it works!", + 2*28, 8*32, 400); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 7, Sparky cont. + Room room = (Room) rooms.elementAt(7); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(15,0,18,11,0); + room.AddTextBox("Next you want Sparky to do two things when it hits the right wall. It should stop going right, and it should go up. Use a node.", + 2*28, 2*32, 400); + room.AddTextBox("Connect the node to the right bumper. The node will turn on when Sparky touches the wall on the right.", + 2*28, 6*32, 400); + room.AddTextBox("Where should you wire the node so Sparky will stop going right and move up?", + 2*28, 9*32, 400); + room.AddArrow(17*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 8, Try Sparky right & up + Room room = (Room) rooms.elementAt(8); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(16,6,19,6,6); + room.SetMaterialOutline(15,0,18,0,0); + room.SetMaterialOutline(0,8,0,10,0); + room.AddTextBox("Connect one OUTPUT of the node to the flipflop INPUT that is now off. That will stop Sparky from moving right. Connect the other OUTPUT of the node to the bottom thruster. Sparky will move up while touching the right wall.", + 2*28, 2*32, 400); + room.AddTextBox("Try it now.", + 2*28, 9*32, 500); + room.AddArrow(0, 9*32+16, Arrow.DIR_LEFT, 28, Color.white); + } + { // Room 9, Sparky comes back + Room room = (Room) rooms.elementAt(9); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(19,8,19,10,0); + room.SetMaterialOutline(1,11,4,11,0); + room.AddTextBox("The next step is to make Sparky come back after Checkers gets the crystal. Let Checkers signal Sparky with the antenna when it's okay to return.", + 2*28, 2*32, 500); + room.AddTextBox("Use another flipflop. Connect Sparky's antenna OUTPUT to the \"cold\" (off) INPUT of the flipflop.", + 2*28, 5*32, 470); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 10, Sparky goes left & down + Room room = (Room) rooms.elementAt(10); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(19,3,19,5,0); + room.AddTextBox("For Sparky to return, it should move left and down. Use a node.", + 5*28, 2*32, 400); + room.AddTextBox("Connect the node INPUT to the cold OUTPUT of the flipflop that you just wired to the antenna. Connect the node OUTPUTS to the top and right thrusters.", + 2*28, 8*32, 500); + room.AddArrow(559, 4*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 11, Test antenna + Room room = (Room) rooms.elementAt(11); + room.SetMaterialOutline(0,0,19,11,1); + room.SetMaterialOutline(0,3,19,5,0); + room.AddTextBox("To test the new circuit, touch Sparky's antenna INPUT with the hot cursor. (Remote Control must be on.)", + 2*28, 2*32, 500); + room.AddTextBox("The antenna OUTPUT will turn on; the flipflop will flip, and both thrusters will turn on.", + 2*28, 5*32, 500); + room.AddTextBox("Use the hot cursor again to reset both flipflops (left sides off).", + 2*28, 8*32, 500); + room.AddTextBox("Turn Sparky's thruster switch off and put Spark inside of Checkers.", + 2*28, 10*32, 500); + room.AddArrow(559, 4*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 12, Checkers task + Room room = (Room) rooms.elementAt(12); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,3,0,5,0); + room.SetMaterialOutline(19,5,19,7,0); + room.AddTextBox("The second task is to use Checkers to get the crystal.", + 2*28, 2*32, 500); + room.AddTextBox("Grabbing the crystal is easy. Connect a NOT-gate to Checkers' grabber INPUT.", + 2*28, 10*32, 500); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 13, How to go right & left? + Room room = (Room) rooms.elementAt(13); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,5,19,7,0); + room.AddTextBox("Here is one way to move Checkers to the crystal. Connect a wire from the left thruster to the hot side of a flipflop. Checkers will move right.", + 2*28, 2*32, 500); + room.AddTextBox("Should you use the right bumper to flip the flipflop and make Checkers return? Or is there a better way?", + 2*28, 9*32, 500); + room.AddArrow(559, 6*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 14, Use the grabber output + Room room = (Room) rooms.elementAt(14); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,5,0,7,0); + room.SetMaterialOutline(19,6,19,8,0); + room.AddTextBox("You don't want to use the right bumper to stop Checkers, since the door may not be open when Checkers reaches it. You want Checkers to keep moving right until it grabs the crystal.", + 2*28, 2*32, 500); + room.AddTextBox("When Checkers gabs the crystal, the grabber OUTPUT will come on. Use that to flip the flipflop and make Checkers return.", + 2*28, 9*32, 500); + room.AddArrow(559, 7*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 15, Test grabber + Room room = (Room) rooms.elementAt(15); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,6,19,8,0); + room.AddTextBox("Connect a wire from the grabber OUTPUT to the cold flipflop input. Connect another wire from the cold flipflop OUTPUT to the right thruster. When Checkers grabs the crystal, the flipflop will flip and and Checkers will move left.", + 2*28, 2*32, 500); + room.AddTextBox("Test your circuit by letting Checkers grab this crystal. Then restore the original circuit.", + 2*28, 9*32, 500); + room.AddArrow(559, 7*32+16, Arrow.DIR_RIGHT, 28, Color.white); + items.addElement(new Crystal(9*28, 6*32, room, 100000)); + } + { // Room 16, Checkers signals Sparky + Room room = (Room) rooms.elementAt(16); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(0,6,0,9,0); + room.SetMaterialOutline(1,11,4,11,0); + room.AddTextBox("The last step is for Checkers to let Sparky know it's time to come back. Connect a wire from Checkers' left bumper to it's antenna. When Checkers comes back after grabbing the crystal it will hit the wall and beep.", + 2*28, 2*32, 500); + room.AddTextBox("You can test that if you want. Be sure to reset all the flipflops with the hot cursor before you continue (left sides off).", + 5*28, 8*32, 400); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 17, Big test + Room room = (Room) rooms.elementAt(17); + room.SetMaterialOutline(0,0,19,11,6); + room.SetMaterialOutline(1,0,4,11,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("Now it's time for the real thing! Turn the Remote Control off and the thruster switches on. Put Sparky on the S and Checkers on the C next door. Turn the Remote Control on.", + 5*28, 2*32, 400); + room.AddTextBox("(Use the PANIC BUTTON to stop the sentry if you get stuck. Press it again to restart it.)", + 5*28, 7*32, 400); + room.AddTextBox("GOOD LUCK!", + 5*28, 10*32, 500); + room.AddTextBox("PUZZLE", + 17*28, 10*32, 500); + room.AddArrow(559,10*32+16, Arrow.DIR_RIGHT, 28, Color.white); + room.AddArrow(3*28, 383, Arrow.DIR_DOWN, 28, Color.white); + } + { // Room 18, Puzzle again + Room room = (Room) rooms.elementAt(18); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(11,0,19,4,5); + room.SetMaterialOutline(11,0,11,6,5); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterial(18,5,8); + room.SetMaterial(1,1,12); + room.AddTextBox("{BIG} C", + 3*28, 3*32, 500); + room.AddTextBox("{BIG} S", + 3*28, 10*32, 500); + room.AddTextBox("PANIC BUTTON", + 4*28, 2*32, 200); + int[] pace = {3*28,2*32, 3*28,9*32}; + int[] program = {4*28,0,20*28,12*32, 0,9*32}; + items.addElement(new Sentry(0,0,room,pace,program,true)); + items.addElement(new Crystal(17*28, 2*32, room, 100000)); + } + { // Room 19, End + Room room = (Room) rooms.elementAt(19); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(1,0,4,0,0); + room.SetMaterialOutline(19,8,19,10,0); + room.AddTextBox("You have learned some handy robot circuits. Now you are ready to move through the Town of Robotropolis. As you journey there, remember to solve the puzzles one step at a time, and use the Lab to test your ideas.", + 5*28, 2*32, 400); + room.AddTextBox("The levels above the Town are most easily solved with chips. Explore Chip design after you leave Town.", + 2*28, 9*32, 500); + room.AddArrow(559, 9*32+16, Arrow.DIR_RIGHT, 28, Color.white); + } + { // Room 20, Portals + Room room = (Room) rooms.elementAt(20); + room.SetMaterialOutline(0,0,19,11,5); + room.SetMaterialOutline(0,8,0,10,0); + room.SetMaterial(19,10,0); + room.SetMaterial(4,2,9); + room.SetMaterial(4,5,10); + room.AddTextBox("Learn about Chip Design.", + 5*28, 3*32, 500); + room.AddTextBox("Return to the Main Menu.", + 5*28, 6*32, 500); + } + { // Room 21, Shortcut + Room room = (Room) rooms.elementAt(21); + room.SetMaterialOutline(0,0,19,9,5); + room.SetMaterialOutline(0,11,19,11,5); + room.SetMaterial(0,10,0); + room.SetMaterial(19,10,0); + room.AddTextBox("{BIG} {000,255,000} SHORTCUT", + 172, 6*32, 400); + } + + int[] list1 = {19,20,21,1,2,3}; + LinkRoomsHorizontally(list1); + LinkRoomsUpDown(2,4); + LinkRoomsUpDown(4,5); + LinkRoomsLeftRight(5,6); + LinkRoomsUpDown(6,7); + LinkRoomsUpDown(7,8); + LinkRoomsLeftRight(9,8); + LinkRoomsUpDown(9,10); + int[] list2 = {10,11,12,13,14,15,16}; + LinkRoomsHorizontally(list2); + LinkRoomsUpDown(16,17); + LinkRoomsLeftRight(17,18); + LinkRoomsUpDown(17,19); + + gameCursor = new LabCursor(16*28+14,9*32+16,(Room) rooms.elementAt(1)); + helpCam = new HelpCam( (Room) rooms.elementAt(0)); + solderingPen = new SolderingPen(); + remote = new Remote(); + items.addElement(gameCursor); + items.addElement(helpCam); + items.addElement(solderingPen); + items.addElement(remote); + player = gameCursor; + currentViewer = player; + + } + +} \ No newline at end of file diff --git a/src/com/droidquest/materials/AntiPlayer.java b/src/com/droidquest/materials/AntiPlayer.java new file mode 100644 index 0000000..aec839b --- /dev/null +++ b/src/com/droidquest/materials/AntiPlayer.java @@ -0,0 +1,40 @@ +package com.droidquest.materials; + +import java.awt.Color; + +import com.droidquest.Room; +import com.droidquest.avatars.GameCursor; +import com.droidquest.items.GenericRobot; +import com.droidquest.items.Item; + +public class AntiPlayer extends Material +{ + // Sends the Player (in or out of a robot) to the Main Office + + public AntiPlayer() + { + super(Color.black,true,false); + } + + public void TouchedByItem(Item item) + { + boolean trigger = false; + if (item == level.player) + trigger = true; + else if (item instanceof GenericRobot) + { + GameCursor gc = (GameCursor) level.gameCursor; + if (gc.PlayerInRobot(null) == item) + trigger=true;; + } + + if (trigger) + { + level.player.room = (Room) level.rooms.elementAt(40); + level.player.x = 10*28; + level.player.y = 5*32; + level.currentViewer = level.player; + } + } + + } diff --git a/src/com/droidquest/materials/AutoRunner.java b/src/com/droidquest/materials/AutoRunner.java new file mode 100644 index 0000000..33c5c33 --- /dev/null +++ b/src/com/droidquest/materials/AutoRunner.java @@ -0,0 +1,77 @@ +package com.droidquest.materials; + +import java.awt.Color; + +import com.droidquest.items.Item; + +public class AutoRunner extends Material +{ +int direction; +public static final int UP =0; +public static final int RIGHTUP =1; +public static final int RIGHT =2; +public static final int RIGHTDOWN=3; +public static final int DOWN =4; +public static final int LEFTDOWN =5; +public static final int LEFT =6; +public static final int LEFTUP =7; +public static final int STOP =8; + +public AutoRunner(int d) + { + super(Color.black, true, false); + direction = d; + } + +public void TouchedByItem(Item item) + { + if (item == level.player) + switch (direction) + { + case UP: + level.player.autoX= level.player.x; + level.player.autoY= level.player.y-32; + level.player.automove=1; + break; + case RIGHTUP: + level.player.autoX= level.player.x+28; + level.player.autoY= level.player.y-32; + level.player.automove=1; + break; + case RIGHT: + level.player.autoX= level.player.x+28; + level.player.autoY= level.player.y; + level.player.automove=1; + break; + case RIGHTDOWN: + level.player.autoX= level.player.x+28; + level.player.autoY= level.player.y+32; + level.player.automove=1; + break; + case DOWN: + level.player.autoX= level.player.x; + level.player.autoY= level.player.y+32; + level.player.automove=1; + break; + case LEFTDOWN: + level.player.autoX= level.player.x-28; + level.player.autoY= level.player.y+32; + level.player.automove=1; + break; + case LEFT: + level.player.autoX= level.player.x-28; + level.player.autoY= level.player.y; + level.player.automove=1; + break; + case LEFTUP: + level.player.autoX= level.player.x-28; + level.player.autoY= level.player.y-32; + level.player.automove=1; + break; + case STOP: + level.player.automove=0; + break; + } + } + +} diff --git a/src/com/droidquest/materials/BatteryIn.java b/src/com/droidquest/materials/BatteryIn.java new file mode 100644 index 0000000..18386e7 --- /dev/null +++ b/src/com/droidquest/materials/BatteryIn.java @@ -0,0 +1,86 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.items.Crystal; +import com.droidquest.items.Item; +import com.droidquest.levels.Level; + +public class BatteryIn extends Material +{ + // Charges the Battery when an Energy Crystal is passed over it. + + public void BatteryIn() + { + passable = true; + GenerateIcons(); + } + + public transient Item robot; + + public void GenerateIcons() + { + BufferedImage bi = new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR); + icon = new ImageIcon(bi); + Graphics g; + try + { + g = bi.getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + + g.setColor(Color.white); + g.fillRect(0,0,28,32); + g.setColor(Color.black); + g.fillRect(12,4,4,24); + g.fillRect(8,8,12,16); + g.fillRect(4,10,20,12); + g.fillRect(0,14,28,4); + g.fillRect(0,8,4,2); + g.fillRect(0,22,4,2); + g.fillRect(24,8,4,2); + g.fillRect(24,22,4,2); + passable = true; + } + + public void TouchedByItem(Item item) + { + if (item.charge > 0) + { + // Check to see if it's a pure Crystal, not a Black Crystal + if (item instanceof Crystal) + { + int empty = 100000 - robot.charge; + if (empty >= item.charge) + { + robot.charge += item.charge; + item.charge=0; + } + else + { + item.charge-=empty; + robot.charge=100000; + } + level.PlaySound(robot.InternalRoom, Level.DISCHARGESOUND); + } + } + } + + public boolean equals(Material mat) + { + if (super.equals(mat)) + if (robot != null) + if (robot == ((BatteryIn)mat).robot) + return true; + return false; + } + + } \ No newline at end of file diff --git a/src/com/droidquest/materials/BatteryOut.java b/src/com/droidquest/materials/BatteryOut.java new file mode 100644 index 0000000..fa28a05 --- /dev/null +++ b/src/com/droidquest/materials/BatteryOut.java @@ -0,0 +1,78 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.items.Item; + +public class BatteryOut extends Material +{ + // Graph that shows the battery charge in a Generic Robot + + public BatteryOut() + { + passable = true; + GenerateIcons(); + } + + public transient Item robot; + + public void GenerateIcons() + { + BufferedImage bi = new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR); + icon = new ImageIcon(bi); + Graphics g; + try + { + g = bi.getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + + g.setColor(Color.black); + g.fillRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(4,0,8,32); + g.fillRect(18,0,10,32); + g.fillRect(0,8,4,4); + g.fillRect(0,20,4,4); + } + + public void Animate() + { + Graphics g; + try + { + g = icon.getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + g.setColor(Color.black); + g.fillRect(12,0,6,32); + g.setColor(new Color(255,128,0)); + if (robot!=null) + { + int fuel = (robot.charge+1564) / 3125; // 3125 = 100,000/32 + g.fillRect(12,32-fuel,6,fuel); + } + } + + public boolean equals(Material mat) + { + if (super.equals(mat)) + if (robot != null) + if (robot == ((BatteryOut)mat).robot) + return true; + return false; + } + + } diff --git a/src/com/droidquest/materials/BinaryLock.java b/src/com/droidquest/materials/BinaryLock.java new file mode 100644 index 0000000..a06761f --- /dev/null +++ b/src/com/droidquest/materials/BinaryLock.java @@ -0,0 +1,223 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.items.BinaryKey; +import com.droidquest.items.Item; + +public class BinaryLock extends Material +{ + // Binary shaped Generic Lock; Used to redefine materials in the local room. + + int doorState=0; + transient BinaryKey latchKey = null; + transient Room room; + transient Room currentRoom; + static public int NARROW = -1; + static public int WIDE = -2; + static public int REMOVE = -3; + static public int RESET = -4; + static public int LEFT = -5; + static public int RIGHT = -6; + static public int UP = -7; + static public int DOWN = -8; + int[][] program; + + // program[][] is an array of arrays. Each array holds the behavior of a + // single value of doorState. + // + // A single array can hold one of the following: +// A single value of Lock.NARROW, Lock.WIDE, or Lock.REMOVE to define a pause +// A single value of RESET, LEFT, RIGHT, UP, or DOWN to change rooms +// A series of triplets (X,Y,M) with the XY position and the Materials +// Index. + // + // Pause value can be one of the following: + // Lock.NARROW = Pause until the key is placed once more precisely into the lock. + // Lock.WIDE = Pause until the key is placed ANYWHERE into the lock + // Lock.REMOVE = Pause until the key is removed. + // + // Pause values automatically reset the current Room to the original value. + // + // Lock.RESET = Set current room to the original room value + // Lock.LEFT = Change the current room to the room's left room + // Lock.RIGHT = Same, but right + // Lock.UP = Same, but up + // Lock.DOWN = Same, but down + // + // The room is normally the key's rom when the key touches the lock, and + // the triplets change the materials within the current room. With these + // commands the current room can be changed so other rooms can be + // manipulated. + // + // Here's a sample program[][] + // + // int[][] = { +// {Lock.NARROW}, // Wait for precise placement +// {10,5,0, 11,5,0}, // Converts two spots to holes +// {10,6,0, 11,6,0}, // Same, but lower +// {Lock.NARROW}, // Wait again +// {10,6,1, 11,6,1}, // Converts two spots to wall +// {10,5,1, 11,5,1} // same, in reverse, go to pause. + // }; + // + + public BinaryLock(Color lc, int[][] prg) + { + super(true, false); + color = lc; + program = prg; + GenerateIcons(); + } + + public void GenerateIcons() + { + BufferedImage bi = new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR); + Graphics g; + try + { + g = bi.getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + + g.setColor(color); + g.fillRect(0,0,28,32); + g.setColor(Color.black); + g.fillRect(16,2,4,8); + g.fillRect(16,12,4,2); + g.fillRect(12,14,4,4); + g.fillRect(20,14,4,4); + g.fillRect(16,18,4,2); + g.fillRect(16,22,4,8); + g.fillRect(24,4,4,4); + g.fillRect(24,24,4,4); + icon = new ImageIcon(bi); + } + + public boolean equals(Material mat) + { + if (super.equals(mat)) + if (program == ((BinaryLock)mat).program) + return true; + return false; + } + + public void Animate() + { + if (doorState == program.length) + doorState = 0; + + if (latchKey==null) + return; + + + if (program[doorState].length > 1) + { + for (int a=0; a=10 && X <=14 + && Y<=4) + doorState++; + } + else if (program[doorState][0]==WIDE) + { + currentRoom = room; + doorState++; + } + } + + if (doorState == program.length) + doorState = 0; + + } + + } diff --git a/src/com/droidquest/materials/BlueGridSwitch.java b/src/com/droidquest/materials/BlueGridSwitch.java new file mode 100644 index 0000000..1bf9e70 --- /dev/null +++ b/src/com/droidquest/materials/BlueGridSwitch.java @@ -0,0 +1,202 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.util.Date; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.decorations.Graphix; +import com.droidquest.decorations.TextBox; +import com.droidquest.items.Item; + +public class BlueGridSwitch extends Material +{ + // This object turns off the Blue grid (and HotWires), and opens the + // doorway to the room above. + + public ImageIcon[] images; + boolean value=false; + int animationState=0; + transient Room room=null; + Date timeout; + transient TextBox textbox = null; + + public BlueGridSwitch() + { + super(true, false); + } + + public void GenerateIcons() + { + images = new ImageIcon[2]; + for (int a=0; a<2; a++) + { + images[a] = new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = images[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + Color c; + if (a==0) + c = Color.white; + else + c = new Color(255,128,0); + + g2.setColor(c); + g.fillRect(0,0,28,32); + g2.setColor(Color.black); + g.fillRect(4,14,20,4); + g.fillRect(8,12,12,8); + g.fillRect(12,8,4,16); + g2.setColor(c); + g.fillRect(12,14,4,4); + } + + icon = images[0]; + if (value) + icon = images[1]; + } + + public void TouchedByItem(Item item) + { + if (animationState==0) + { + animationState = 1; + room = item.room; + timeout = new Date(new Date().getTime() + 20000); + textbox = (TextBox) item.room.textBoxes.elementAt(0); + } + } + + public void Animate() + { + icon = images[0]; + if (value) + { + icon = images[1]; + Date now = new Date(); + long timer = timeout.getTime() - now.getTime(); + if (timer > 0) + { + long seconds = Math.abs(timer/1000) + 1; + if (seconds<10) + textbox.textString = "0" + seconds; + else + textbox.textString = "" + seconds; + } + else + { + textbox.textString = "00"; + animationState++; + } + + } + + switch (animationState) + { + case 1:value=true; + room.SetMaterial(2,0,0); + room.upRoom.SetMaterial(2,11,0); + for (int a=0; a 0) + { + long seconds = Math.abs(timer/1000) + 1; + if (seconds<10) + textbox.textString = "0" + seconds; + else + textbox.textString = "" + seconds; + } + else + { + for (int a=0; a0) + { + item.charge=0; + level.PlaySound(item.room, Level.DISCHARGESOUND); + } + } + + public void Animate() + { + icon = images[0]; + if (value) + icon = images[1]; + } + + public boolean equals(Material mat) + { + if (super.equals(mat)) + if (value == ((HotWires)mat).value + && wall == ((HotWires)mat).wall) + return true; + return false; + } + + } diff --git a/src/com/droidquest/materials/Lock.java b/src/com/droidquest/materials/Lock.java new file mode 100644 index 0000000..3db6c9c --- /dev/null +++ b/src/com/droidquest/materials/Lock.java @@ -0,0 +1,245 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.items.Item; +import com.droidquest.items.Key; + +public class Lock extends Material +{ + // Generic Lock; Used to redefine materials in the local room. + + int doorState=0; + Color keyColor; + transient Key latchKey = null; + transient Room room; + transient Room currentRoom; + static public int NARROW = -1; + static public int WIDE = -2; + static public int REMOVE = -3; + static public int RESET = -4; + static public int LEFT = -5; + static public int RIGHT = -6; + static public int UP = -7; + static public int DOWN = -8; + int[][] program; + + // program[][] is an array of arrays. Each array holds the behavior of a + // single value of doorState. + // + // A single array can hold one of the following: +// A single value of Lock.NARROW, Lock.WIDE, or Lock.REMOVE to define a pause +// A single value of RESET, LEFT, RIGHT, UP, or DOWN to change rooms +// A series of triplets (X,Y,M) with the XY position and the Materials +// Index. + // + // Pause value can be one of the following: + // Lock.NARROW = Pause until the key is placed once more precisely into the lock. + // Lock.WIDE = Pause until the key is placed ANYWHERE into the lock + // Lock.REMOVE = Pause until the key is removed. + // + // Pause values automatically reset the current Room to the original value. + // + // Lock.RESET = Set current room to the original room value + // Lock.LEFT = Change the current room to the room's left room + // Lock.RIGHT = Same, but right + // Lock.UP = Same, but up + // Lock.DOWN = Same, but down + // + // The room is normally the key's rom when the key touches the lock, and + // the triplets change the materials within the current room. With these + // commands the current room can be changed so other rooms can be + // manipulated. + // + // Here's a sample program[][] + // + // int[][] = { +// {Lock.NARROW}, // Wait for precise placement +// {10,5,0, 11,5,0}, // Converts two spots to holes +// {10,6,0, 11,6,0}, // Same, but lower +// {Lock.NARROW}, // Wait again +// {10,6,1, 11,6,1}, // Converts two spots to wall +// {10,5,1, 11,5,1} // same, in reverse, go to pause. + // }; + // + + public Lock(Color lc, Color kc, int[][] prg) + { + super(true, false); + color = lc; + keyColor = kc; + program = prg; + GenerateIcons(); + } + + public void GenerateIcons() + { + BufferedImage bi = new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR); + Graphics g; + try + { + g = bi.getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + "Image"); + return; + } + + g.setColor(color); + g.fillRect(0,0,28,32); + g.setColor(Color.black); + g.fillRect(0,14,16,2); + g.fillRect(0,16,12,2); + g.fillRect(2,18,6,2); + icon = new ImageIcon(bi); + } + + public boolean equals(Material mat) + { + if (super.equals(mat)) + if (keyColor == ((Lock)mat).keyColor + && program == ((Lock)mat).program) + return true; + return false; + } + + public void Animate() + { + if (doorState == program.length) + doorState = 0; + + if (latchKey==null) + { + if (program[doorState][0]==Lock.REMOVE) + { + for (int a=0; a 1) + { + for (int a=0; a=16 && X <=20 + && Y>=10 && Y<=14) + doorState++; + } + else if (program[doorState][0]==WIDE) + { + currentRoom = room; + doorState++; + } + } + + if (doorState == program.length) + doorState = 0; + + } + + } \ No newline at end of file diff --git a/src/com/droidquest/materials/LockS1.java b/src/com/droidquest/materials/LockS1.java new file mode 100644 index 0000000..20c46b1 --- /dev/null +++ b/src/com/droidquest/materials/LockS1.java @@ -0,0 +1,49 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.util.Date; + +import com.droidquest.Room; +import com.droidquest.items.Item; +import com.droidquest.items.Magnet; + +public class LockS1 extends Material +{ +Date timeout; +transient Item magnet=null; +transient Room room = null; + +public LockS1() + { + super(new Color(0,0,128),false,true); + } + +public void TouchedByItem(Item item) + { + if (item instanceof Magnet) + { + magnet = item; + room = item.room; + timeout = new Date(new Date().getTime() + 10000); + } + } + +public void Animate() + { + if (magnet != null) + { + Date now = new Date(); + if (now.getTime() > timeout.getTime()) + { + if (magnet.room == room) + { + level.LinkRoomsLeftRight(11,30); + level.LinkRoomsLeftRight(30,11); + room.SetMaterial(10,3,0); + room.SetMaterial(11,3,0); + } + } + } + } + +} diff --git a/src/com/droidquest/materials/Material.java b/src/com/droidquest/materials/Material.java new file mode 100644 index 0000000..255ad57 --- /dev/null +++ b/src/com/droidquest/materials/Material.java @@ -0,0 +1,130 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Graphics; +import java.io.Serializable; + +import javax.swing.ImageIcon; + +import com.droidquest.RoomDisplay; +import com.droidquest.items.Item; +import com.droidquest.levels.Level; + +public class Material implements Serializable, Cloneable +{ + public transient static Level level; + public transient ImageIcon icon; + public String file; + public boolean passable; + public boolean detectable; + public Color color; + + public Material(){} + + public Material(String filename, boolean p, boolean d) + { + // icon=Toolkit.getDefaultToolkit().getImage(filename); + icon = new ImageIcon(filename); + passable = p; + detectable = d; + } + + public Material(boolean p, boolean d) + { + passable = p; + detectable = d; + color = Color.black; + } + + public Material (Color c, boolean p, boolean d) + { + passable=p; + detectable = d; + color=c; + } + + public void GenerateIcons() + { + if (file != null) + icon = new ImageIcon(file); + } + + public void Draw(Graphics g, RoomDisplay rd, int x, int y) + { + if (icon==null) + { + // Blank Background + g.setColor(color); + g.fillRect(x*28,y*32,28,32); +// if (color!=Color.BLACK){ +// g.setColor(color.brighter()); +// g.drawLine(x*28, y*32, x*28+27, y*32); +// g.drawLine(x*28, y*32, x*28, y*32+31); +// g.setColor(color.darker()); +// g.drawLine(x*28+27, y*32, x*28+27, y*32+31); +// g.drawLine(x*28, y*32+31, x*28+27, y*32+31); +// } + return; + } + else + { + // Material Background + g.drawImage(icon.getImage(), x*28, y*32, rd); + return; + } + } + + public void TouchedByItem(Item item) + { + } + + public void Animate() + { + } + + public boolean Passable(Item item) + { + return passable; + } + + public boolean Detectable(Item item) + { + return detectable; + } + + public boolean equals(Material mat) + { + if (getClass() == mat.getClass() + && color == mat.color + && passable == mat.passable + && detectable == mat.detectable + && file == mat.file) + return true; + else + return false; + } + + public static Material FindSimiliar(Material mat1) + { + for (int a=0; a0) + hit--; + if (hit>=2) + { + target.room = (Room) level.rooms.elementAt(58); + target.charge=0; + if (target.InternalRoom != null) + { + Room room = target.InternalRoom; + if (room.wires.size()>0) + for(int a=0; a timeout.getTime()) + { + states[0]=1; + for (int a=1; a<10; a++) + states[a]=0; + } + } + + } + +public boolean equals(Material mat) + { + if (super.equals(mat)) + if (number == ((MultiButton)mat).number) + return true; + return false; + } +} diff --git a/src/com/droidquest/materials/MultiSwitch.java b/src/com/droidquest/materials/MultiSwitch.java new file mode 100644 index 0000000..7e906bf --- /dev/null +++ b/src/com/droidquest/materials/MultiSwitch.java @@ -0,0 +1,157 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.util.Date; + +import javax.swing.ImageIcon; + +import com.droidquest.Room; +import com.droidquest.items.Item; + +public class MultiSwitch extends Material +{ +public int number; //0=starter, 1,2,3,4=pistons +transient ImageIcon images[]; +static int[] states = {0,0,0,0,0}; //0=Blue, 1=White, 2=Orange +public Date timeout; +transient Room room=null; + +public MultiSwitch(int n, int s) + { + super(true, false); + number = n; + states[number] = s; + } + +public void GenerateIcons() + { + images = new ImageIcon[3]; + for (int a=0; a<3; a++) + { + images[a] = new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = images[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + g2.setBackground(Color.black); + g2.clearRect(0,0,28,32); + if (a==0) + g2.setColor(Color.blue); + else if (a==1) + g2.setColor(Color.white); + else if (a==2) + g2.setColor(new Color(255,128,0)); + + g2.fillRect(12,4,6,24); + g2.fillRect(18,12,10,8); + } + + icon = images[0]; + } + +public void TouchedByItem(Item item) + { + if (room==null) + room = item.room; + + if (number==0) + { + if (states[0]!=2) + { + states[0]=2; + states[1]=1; + states[2]=1; + states[3]=1; + states[4]=1; + timeout = new Date(new Date().getTime() + 5000); + } + } + else + { + boolean okay = true; + if (states[0]<2) okay=false; + for (int a=1; a timeout.getTime()) + { + states[0]=0; + states[1]=0; + states[2]=0; + states[3]=0; + states[4]=0; + } + } + + } + +public boolean equals(Material mat) + { + if (super.equals(mat)) + if (number == ((MultiSwitch)mat).number) + return true; + return false; + } + +} diff --git a/src/com/droidquest/materials/PanicButton.java b/src/com/droidquest/materials/PanicButton.java new file mode 100644 index 0000000..ba5e533 --- /dev/null +++ b/src/com/droidquest/materials/PanicButton.java @@ -0,0 +1,110 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.items.Item; +import com.droidquest.items.Sentry; + +public class PanicButton extends Material +{ +boolean state = true; +transient ImageIcon images[]; +transient Sentry sentry; +int number; + +// image[0] = blue, off, Sentry alive +// image[1] = orange, on, Sentry dead + +public PanicButton(int n) + { + super(true, false); + number = n; + GenerateIcons(); + } + +public void GenerateIcons() + { + images = new ImageIcon[2]; + for (int a=0; a<2; a++) + { + images[a] = new ImageIcon(new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR)); + Graphics g; + try + { + g = images[a].getImage().getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + Graphics2D g2 = (Graphics2D) g; + g2.setBackground(Color.black); + g2.clearRect(0,0,28,32); + Color color; + if (a==0) + color = Color.blue; + else + color = new Color(255,128,0); + + g.setColor(color); + g.fillRect(8,0,12,26); + g.fillRect(4,2,20,22); + g.fillRect(0,4,28,18); + g.setColor(Color.black); + g.fillRect(8,6,12,14); + g.fillRect(4,8,20,10); + g.setColor(color); + g.fillRect(12,8,4,10); + g.fillRect(8,10,12,6); + } + icon = images[0]; + } + +public void TouchedByItem(Item item) + { + if (item == level.player && level.player.carriedBy == null) + { + if (sentry==null) + { + for (int a=0; a 80) + { + GenericRobot gr = (GenericRobot) level.player.room.portalItem; + level.currentViewer = level.player; + gr.periscope = false; + } + } + +} diff --git a/src/com/droidquest/materials/PeriscopeUp.java b/src/com/droidquest/materials/PeriscopeUp.java new file mode 100644 index 0000000..8378e74 --- /dev/null +++ b/src/com/droidquest/materials/PeriscopeUp.java @@ -0,0 +1,61 @@ +package com.droidquest.materials; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; + +import javax.swing.ImageIcon; + +import com.droidquest.items.GenericRobot; +import com.droidquest.items.Item; + +public class PeriscopeUp extends Material +{ +public PeriscopeUp() + { + super(true, false); + GenerateIcons(); + } + +public void GenerateIcons() + { + BufferedImage bi = new BufferedImage(28,32,BufferedImage.TYPE_4BYTE_ABGR); + Graphics g; + try + { + g = bi.getGraphics(); + } + catch (NullPointerException e) + { + System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); + return; + } + + g.setColor(Color.black); + g.fillRect(0,0,28,32); + g.setColor(Color.white); + g.fillRect(8,9,12,2); + g.fillRect(8,21,12,2); + g.fillRect(4,11,4,2); + g.fillRect(4,19,4,2); + g.fillRect(20,11,4,2); + g.fillRect(20,19,4,2); + g.fillRect(0,13,4,6); + g.fillRect(24,13,4,6); + g.fillRect(8,13,12,6); + icon = new ImageIcon(bi); + } + +public void TouchedByItem(Item item) + { + if (item == level.player) + if (item.x > 462 && item.y < 80) + { + GenericRobot gr = (GenericRobot) level.player.room.portalItem; + level.currentViewer = gr; + gr.periscope = true; + } + } + +} + diff --git a/src/com/droidquest/materials/PlayerBlocker.java b/src/com/droidquest/materials/PlayerBlocker.java new file mode 100644 index 0000000..e8c6060 --- /dev/null +++ b/src/com/droidquest/materials/PlayerBlocker.java @@ -0,0 +1,68 @@ +package com.droidquest.materials; + +import java.awt.Color; + +import javax.swing.ImageIcon; + +import com.droidquest.avatars.GameCursor; +import com.droidquest.items.Item; + +public class PlayerBlocker extends Material +{ +transient ImageIcon images[]; +String[] filenames; +int animationState=0; + +public PlayerBlocker(Color col) + { + color = col; + detectable = false; + } + +public PlayerBlocker(String[] files) + { + detectable = false; + filenames = files; + GenerateIcons(); + } + +public void GenerateIcons() + { + if (filenames != null) + { + int numfiles = filenames.length; + images = new ImageIcon[numfiles]; + for (int a=0; a= timeout.getTime()) + { + switchState++; + timing = false; + currentRoom = room; + } + } + else + { + timeout = new Date(new Date().getTime() + 1000*program[switchState][1]); + timing = true; + } + break; + case SETVALUEHIGH: + value=true; + switchState++; + break; + case SETVALUELOW: + value=false; + switchState++; + break; + case REPLACE: + if (currentRoom == null) + currentRoom = trigger.room; + for (int a=0; a<(program[switchState].length-1)/3; a++) + currentRoom.SetMaterial(program[switchState][a*3+1], + program[switchState][a*3+2], + program[switchState][a*3+3]); + switchState++; + break; + case LEFTROOM: + currentRoom = currentRoom.leftRoom; + switchState++; + break; + case RIGHTROOM: + currentRoom = currentRoom.rightRoom; + switchState++; + break; + case UPROOM: + currentRoom = currentRoom.upRoom; + switchState++; + break; + case DOWNROOM: + currentRoom = currentRoom.downRoom; + switchState++; + break; + case RESETROOM: + currentRoom = room; + switchState++; + break; + } + + } + + } diff --git a/src/com/droidquest/materials/Switch1.java b/src/com/droidquest/materials/Switch1.java new file mode 100644 index 0000000..884a138 --- /dev/null +++ b/src/com/droidquest/materials/Switch1.java @@ -0,0 +1,34 @@ +package com.droidquest.materials; + +import com.droidquest.items.Item; +import com.droidquest.items.Train; + +public class Switch1 extends Switch +{ +transient Train train; + +public Switch1() + { + super(Switch.ROT_UP); + } + +public void TouchedByItem(Item item) + { + if (train==null) + for (int a=0; a