Initial Version

This commit is contained in:
ThomasFooteDQ
2014-02-02 16:39:08 -05:00
commit dc6d494ff4
304 changed files with 35696 additions and 0 deletions

View File

@@ -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<String, SoundClip> sounds = new HashMap<String, SoundClip>();
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; a<roomlist.length-1; a++)
LinkRoomsLeftRight(roomlist[a],roomlist[a+1]);
}
public void LinkRoomsVertically(int[] roomlist)
{
for (int a=0; a<roomlist.length-1; a++)
LinkRoomsUpDown(roomlist[a],roomlist[a+1]);
}
public void LinkRoomsGrid(int[][] roomgrid)
{
// Requires a rectangular grid... each array is the same length
int height=roomgrid.length;
int width =roomgrid[0].length;
for(int y=0; y<height; y++)
for(int x=0; x<width; x++)
{
if (x<width-1) LinkRoomsLeftRight(roomgrid[y][x], roomgrid[y][x+1]);
if (y<height-1) LinkRoomsUpDown(roomgrid[y][x], roomgrid[y+1][x]);
}
}
public Material materialAt(int x, int y, Room r)
{
if (x<0 || x>19 || 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<rooms.size(); a++)
s.writeObject(rooms.elementAt(a));
// Save Materials Data
s.writeInt(materials.size());
for (a=0; a<materials.size(); a++)
s.writeObject(materials.elementAt(a));
// Save Basic Items data
s.writeInt(items.size());
for (a=0; a<items.size(); a++)
s.writeObject(items.elementAt(a));
// Save Electricity
s.writeBoolean(electricity);
// Save Player, GameCursor, CurrentViewer
s.writeInt(items.indexOf(player));
s.writeInt(items.indexOf(gameCursor));
s.writeInt(items.indexOf(currentViewer));
s.writeInt(items.indexOf(solderingPen));
s.writeInt(items.indexOf(remote));
s.writeInt(items.indexOf(toolbox));
s.writeInt(items.indexOf(helpCam));
s.writeInt(items.indexOf(paintbrush));
// Save Room References (UDLRrooms, PortalItem, Wires)
for (a=0; a<rooms.size(); a++)
((Room)rooms.elementAt(a)).writeRef(s);
// Save Item References
for (a=0; a<items.size(); a++)
((Item)items.elementAt(a)).writeRef(s);
}
public void readObject(ObjectInputStream s) throws IOException
{
int a;
int numRooms = s.readInt();
rooms = new Vector();
for(a=0; a<numRooms; a++)
{
try
{
Room r = (Room) s.readObject();
rooms.addElement(r);
}
catch (ClassNotFoundException e) {}
}
int numMaterials = s.readInt();
materials = new Vector();
for(a=0; a<numMaterials; a++)
{
try
{
Material m = (Material) s.readObject();
materials.addElement(m);
}
catch (ClassNotFoundException e) {}
}
int numItems = s.readInt();
items = new Vector();
for(a=0; a<numItems; a++)
{
try
{
Item i = (Item) s.readObject();
items.addElement(i);
}
catch (ClassNotFoundException e) {}
}
electricity = s.readBoolean();
player = FindItem(s.readInt());
gameCursor = FindItem(s.readInt());
currentViewer = FindItem(s.readInt());
solderingPen = FindItem(s.readInt());
remote = FindItem(s.readInt());
toolbox = FindItem(s.readInt());
helpCam = FindItem(s.readInt());
paintbrush = FindItem(s.readInt());
// Read Room References (UDLRrooms, PortalItem, Wires)
for (a=0; a<numRooms; a++)
((Room)rooms.elementAt(a)).readRef(s);
// Read Item References
for (a=0; a<numItems; a++)
((Item)items.elementAt(a)).readRef(s);
// Generate Material Icons
for (a=0; a<numMaterials; a++)
((Material)materials.elementAt(a)).GenerateIcons();
}
public Item FindItem(String classname)
{
Item item=null;
for (int a=0; a<items.size(); a++)
{
item = (Item) items.elementAt(a);
if (item.getClass().toString().endsWith(classname))
return item;
}
item=null;
return item;
}
public Item FindItem(int itemIndex)
{
if (itemIndex==-1) return null;
if (itemIndex>=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<items.size();a++)
{
Item item = (Item) items.elementAt(a);
item.Erase();
}
items.clear();
items=null;
// Remove all Materials
materials.clear();
materials = null;
// Remove all Rooms
for (a=0; a<rooms.size(); a++)
{
Room room = (Room) rooms.elementAt(a);
room.Erase();
}
rooms.clear();
rooms=null;
// Remove all Local References
player=null;
gameCursor=null;
solderingPen=null;
remote=null;
toolbox=null;
currentViewer=null;
helpCam=null;
System.gc(); // Run Garbage Collection
}
public void WriteInventory()
{
if (player.carrying==null)
return;
AddItemToInventory(player.carrying);
LinkInventory();
SaveInventory();
}
public void AddItemToInventory(Item item)
{
// Save Item
if (item instanceof ToolBox)
return;
Item clonedItem = (Item) item.clone();
invItems.addElement(clonedItem);
invItemIndexes.addElement(new Integer(items.indexOf(item)));
System.out.println( (invItems.size()-1) + ": "
+ "Saving " + item.getClass() + ", index=" + items.indexOf(item));
if (item.carriedBy == player)
{
clonedItem.carriedBy = null;
clonedItem.room = null;
}
if (item.carriedBy == player.carrying)
{
clonedItem.room = null;
}
// Save carried Item
if (item.carrying!=null && item.room == player.room)
AddItemToInventory(item.carrying);
if (item.InternalRoom!=null)
{
// Store Copy of Room
Room clonedRoom = (Room) item.InternalRoom.clone();
invRooms.addElement(clonedRoom);
invRoomIndexes.addElement(new Integer(rooms.indexOf(item.InternalRoom)));
System.out.println("Saving Room to Inventory.");
// Store all Materials in the Internal Room
int matcount=0;
for (int Y=0; Y<12; Y++)
for (int X=0; X<20; X++)
{
int matIndex = item.InternalRoom.RoomArray[Y][X];
Material originalMaterial = (Material) materials.elementAt(matIndex);
Material clonedMaterial = (Material) originalMaterial.clone();
boolean found = false;
for (int a=0; a<invMaterials.size(); a++)
{
Material testMaterial = (Material) invMaterials.elementAt(a);
if (testMaterial.equals(clonedMaterial))
found=true;
}
if (!found)
{
invMaterials.addElement(clonedMaterial);
invMaterialIndexes.addElement(new Integer(matIndex));
matcount++;
}
}
System.out.println("Saved " + matcount + "Materials to Inventory.");
// Store all Items in the Internal Room
if (item.InternalRoom!=null)
for (int a=0; a<items.size(); a++)
{
Item internalItem = (Item) items.elementAt(a);
if (internalItem.room == item.InternalRoom)
AddItemToInventory(internalItem);
}
}
}
public void LinkInventory()
{
for (int a=0; a<invItems.size(); a++)
{
Item item = (Item) invItems.elementAt(a);
if (item.carrying != null)
{
Integer realItemIndex = new Integer(items.indexOf(item.carrying));
int b = 0;
while(((Integer) invItemIndexes.elementAt(b)).intValue()
!= realItemIndex.intValue())
b++;
item.carrying = (Item) invItems.elementAt(b);
System.out.println(item.getClass()
+ " carrying "
+ item.carrying.getClass());
}
if (item.carriedBy != null)
{
Integer realItemIndex = new Integer(items.indexOf(item.carriedBy));
int b = 0;
while(((Integer) invItemIndexes.elementAt(b)).intValue()
!= realItemIndex.intValue())
b++;
item.carriedBy = (Item) invItems.elementAt(b);
System.out.println(item.getClass()
+ " carriedBy "
+ item.carriedBy.getClass());
}
if (item.room != null)
{
Integer realRoomIndex = new Integer(rooms.indexOf(item.room));
int b = 0;
while(((Integer) invRoomIndexes.elementAt(b)).intValue()
!= realRoomIndex.intValue())
b++;
item.room = (Room) invRooms.elementAt(b);
System.out.println(item.getClass()
+ " is in room #" + b);
}
if (item.InternalRoom != null)
{
Integer realInternalRoomIndex = new Integer(rooms.indexOf(item.InternalRoom));
int b = 0;
while(((Integer) invRoomIndexes.elementAt(b)).intValue()
!= realInternalRoomIndex.intValue())
b++;
item.InternalRoom = (Room) invRooms.elementAt(b);
// item.InternalRoom.portalItem = item;
System.out.println(item.getClass()
+ " has internal room #" + b);
}
}
for (int a=0; a<invRooms.size(); a++)
{
Room room = (Room) invRooms.elementAt(a);
if (room.upRoom != null)
{
Integer realRoomIndex = new Integer(rooms.indexOf(room.upRoom));
int b = 0;
while(((Integer) invRoomIndexes.elementAt(b)).intValue()
!= realRoomIndex.intValue())
b++;
room.upRoom = (Room) invRooms.elementAt(b);
}
if (room.downRoom != null)
{
Integer realRoomIndex = new Integer(rooms.indexOf(room.downRoom));
int b = 0;
while(((Integer) invRoomIndexes.elementAt(b)).intValue()
!= realRoomIndex.intValue())
b++;
room.downRoom = (Room) invRooms.elementAt(b);
}
if (room.leftRoom != null)
{
Integer realRoomIndex = new Integer(rooms.indexOf(room.leftRoom));
int b = 0;
while(((Integer) invRoomIndexes.elementAt(b)).intValue()
!= realRoomIndex.intValue())
b++;
room.leftRoom = (Room) invRooms.elementAt(b);
}
if (room.rightRoom != null)
{
Integer realRoomIndex = new Integer(rooms.indexOf(room.rightRoom));
int b = 0;
while(((Integer) invRoomIndexes.elementAt(b)).intValue()
!= realRoomIndex.intValue())
b++;
room.rightRoom = (Room) invRooms.elementAt(b);
}
if (room.portalItem != null)
{
Integer realItemIndex = new Integer(items.indexOf(room.portalItem));
int b = 0;
while(((Integer) invItemIndexes.elementAt(b)).intValue()
!= realItemIndex.intValue())
b++;
room.portalItem = (Item) invItems.elementAt(b);
System.out.println("Room #" + a + " is inside "
+ room.portalItem.getClass());
}
for (int X=0; X<20; X++)
for (int Y=0; Y<12; Y++)
{
Integer realMatIndex = new Integer(room.RoomArray[Y][X]);
room.RoomArray[Y][X] = invMaterialIndexes.indexOf(realMatIndex);
}
for (int w=0; w<room.wires.size(); w++)
{
// System.out.println("Linking wire " + w + " of " + (room.wires.size()-1));
Wire wire = (Wire) room.wires.elementAt(w);
// if (wire.fromPort.myDevice!=null)
// System.out.println("Searching for " + wire.fromPort.myDevice.getClass());
// else
// System.out.println("wire.fromPort.myDevice == NULL");
Integer realItemIndex = new Integer(items.indexOf(wire.fromPort.myDevice));
// System.out.println(" Looking for realItem#" + realItemIndex.intValue());
int b = 0;
while(((Integer) invItemIndexes.elementAt(b)).intValue()
!= realItemIndex.intValue())
b++;
Item invItem = (Item) invItems.elementAt(b);
Device invDevice = (Device) invItem;
b=0;
while (((Device)(wire.fromPort.myDevice)).ports[b] != wire.fromPort)
b++;
wire.fromPort = invDevice.ports[b];
wire.fromPort.myWire = wire;
wire.fromPort.myDevice = invDevice;
// System.out.println(" fromPort wired to "
// + invDevice.getClass()
// + ", Port#"
// + b);
realItemIndex = new Integer(items.indexOf(wire.toPort.myDevice));
b = 0;
while(((Integer) invItemIndexes.elementAt(b)).intValue()
!= realItemIndex.intValue())
b++;
invItem = (Item) invItems.elementAt(b);
invDevice = (Device) invItem;
b=0;
while (((Device)(wire.toPort.myDevice)).ports[b] != wire.toPort)
b++;
wire.toPort = invDevice.ports[b];
wire.toPort.myWire = wire;
wire.toPort.myDevice = invDevice;
// System.out.println(" toPort wired to "
// + invDevice.getClass()
// + ", Port#"
// + b);
if (wire.fromPort.type == Port.TYPE_INPUT)
{
wire.inPort = wire.fromPort;
wire.outPort = wire.toPort;
}
else
{
wire.inPort = wire.toPort;
wire.outPort = wire.fromPort;
}
}
}
}
public void SaveInventory()
{
if (invItems.size()==0) return;
String filename = "temp.inv";
System.out.println("Saving Inventory ");
try
{
FileOutputStream out = new FileOutputStream(filename);
ObjectOutputStream s = new ObjectOutputStream(out);
s.writeInt(invRooms.size());
for (int a=0; a<invRooms.size(); a++)
s.writeObject(invRooms.elementAt(a));
s.writeInt(invMaterials.size());
for (int a=0; a<invMaterials.size(); a++)
s.writeObject(invMaterials.elementAt(a));
s.writeInt(invItems.size());
for (int a=0; a<invItems.size(); a++)
s.writeObject(invItems.elementAt(a));
// Save Room References (UDLRrooms, PortalItem, Wires)
for (int a=0; a<invRooms.size(); a++)
{
Room room = (Room) invRooms.elementAt(a);
s.writeInt(invRooms.indexOf(room.upRoom));
s.writeInt(invRooms.indexOf(room.downRoom));
s.writeInt(invRooms.indexOf(room.rightRoom));
s.writeInt(invRooms.indexOf(room.leftRoom));
s.writeInt(invItems.indexOf(room.portalItem));
s.writeInt(room.wires.size());
for (int b=0; b<room.wires.size(); b++)
{
Wire wire = (Wire) room.wires.elementAt(b);
int p;
s.writeInt(invItems.indexOf(wire.fromPort.myDevice)); // Index of fromport device
p=0; while (((Device)wire.fromPort.myDevice).ports[p] != wire.fromPort) p++;
s.writeInt(p); // Index of fromport (as device.ports[?]
s.writeInt(invItems.indexOf(wire.toPort.myDevice)); // Index of toport device
p=0; while (((Device)wire.toPort.myDevice).ports[p] != wire.toPort) p++;
s.writeInt(p); // Index of toport (as device.ports[?]
s.writeInt(invItems.indexOf(wire.inPort.myDevice)); // Index of inport device
p=0; while (((Device)wire.inPort.myDevice).ports[p] != wire.inPort) p++;
s.writeInt(p); // Index of inport (as device.ports[?]
s.writeInt(invItems.indexOf(wire.outPort.myDevice)); // Index of outport device
p=0; while (((Device)wire.outPort.myDevice).ports[p] != wire.outPort) p++;
s.writeInt(p); // Index of outport (as device.ports[?]
}
}
// Save Item References
for (int a=0; a<invItems.size(); a++)
{
Item item = (Item) invItems.elementAt(a);
s.writeInt(invItems.indexOf(item.carrying));
s.writeInt(invItems.indexOf(item.carriedBy));
s.writeInt(invRooms.indexOf(item.room));
s.writeInt(invRooms.indexOf(item.InternalRoom));
if (item.getClass().toString().endsWith("SmallChip"))
{
SmallChip sc = (SmallChip) item;
String chipfilename = new String("tmp"+a+".chip");
sc.SaveChip(chipfilename);
}
}
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 LoadInventory()
{
roomdisplay.timer.stop();
String filename = "temp.inv";
System.out.println("Loading Inventory ");
int orgNumRooms = rooms.size();
int orgNumMaterials = materials.size();
int orgNumItems = items.size();
try
{
FileInputStream in = new FileInputStream(filename);
ObjectInputStream s = new ObjectInputStream(in);
int numRooms = s.readInt();
System.out.println("Loading " + numRooms + " Rooms from Inventory");
for (int a=0; a<numRooms; a++)
{
try
{
Room room = (Room) s.readObject();
rooms.addElement(room);
}
catch (ClassNotFoundException e) {}
}
int numMaterials = s.readInt();
System.out.println("Loading " + numMaterials + " Materials from Inventory");
for (int a=0; a<numMaterials; a++)
{
try
{
Material material = (Material) s.readObject();
materials.addElement(material);
material.GenerateIcons();
}
catch (ClassNotFoundException e) {}
}
int numItems = s.readInt();
for (int a=0; a<numItems; a++)
{
try
{
Item item = (Item) s.readObject();
items.addElement(item);
System.out.println("Loading " + item.getClass() + " from Inventory");
}
catch (ClassNotFoundException e) {}
}
for (int a=0; a<numRooms; a++)
{
Room room = (Room) rooms.elementAt(orgNumRooms+a);
int upRoomIndex = s.readInt();
int downRoomIndex = s.readInt();
int rightRoomIndex = s.readInt();
int leftRoomIndex = s.readInt();
int portalItemIndex = s.readInt();
if (upRoomIndex != -1)
room.upRoom = (Room) rooms.elementAt(upRoomIndex + orgNumRooms);
if (downRoomIndex != -1)
room.downRoom = (Room) rooms.elementAt(downRoomIndex + orgNumRooms);
if (rightRoomIndex != -1)
room.rightRoom = (Room) rooms.elementAt(rightRoomIndex + orgNumRooms);
if (leftRoomIndex != -1)
room.leftRoom = (Room) rooms.elementAt(leftRoomIndex + orgNumRooms);
if (portalItemIndex != 1)
{
room.portalItem = (Item) items.elementAt(portalItemIndex + orgNumItems);
System.out.println("Room #"+a+" has portalItem:" + room.portalItem.getClass());
}
int numWires = s.readInt();
System.out.println("Linking " + numWires + " wires");
for (int b=0; b<numWires; b++)
{
Wire wire = (Wire) room.wires.elementAt(b);
Item tmpItem = (Item) items.elementAt(s.readInt() + orgNumItems);
Device tmpDevice = (Device) tmpItem;
wire.fromPort = tmpDevice.ports[s.readInt()];
wire.fromPort.myWire = wire;
tmpItem = (Item) items.elementAt(s.readInt() + orgNumItems);
tmpDevice = (Device) tmpItem;
wire.toPort = tmpDevice.ports[s.readInt()];
wire.toPort.myWire = wire;
tmpItem = (Item) items.elementAt(s.readInt() + orgNumItems);
tmpDevice = (Device) tmpItem;
wire.inPort = tmpDevice.ports[s.readInt()];
tmpItem = (Item) items.elementAt(s.readInt() + orgNumItems);
tmpDevice = (Device) tmpItem;
wire.outPort = tmpDevice.ports[s.readInt()];
}
// Modify the Material Indexes
for (int X=0; X<20; X++)
for (int Y=0; Y<12; Y++)
room.RoomArray[Y][X]+=orgNumMaterials;
room.GenerateArray();
}
for (int a=0; a<numItems; a++)
{
Item item = (Item) items.elementAt(orgNumItems+a);
int carryingIndex = s.readInt();
int carriedByIndex = s.readInt();
int roomIndex = s.readInt();
int internalRoomIndex = s.readInt();
if (carryingIndex != -1)
{
item.carrying = (Item) items.elementAt(carryingIndex + orgNumItems);
System.out.println(item.getClass() + " carries " + item.carrying.getClass());
}
if (carriedByIndex != -1)
{
item.carriedBy = (Item) items.elementAt(carriedByIndex + orgNumItems);
System.out.println(item.getClass() + " carriedBy " + item.carriedBy.getClass());
}
if (roomIndex != -1)
{
item.room = (Room) rooms.elementAt(roomIndex + orgNumRooms);
System.out.println(item.getClass() + " is in room #" + roomIndex);
}
else
{
if (gameCursor!=null)
{
item.room = gameCursor.room;
}
else
System.out.println("gameCursor = null");
}
if (internalRoomIndex != -1)
{
item.InternalRoom = (Room) rooms.elementAt(internalRoomIndex + orgNumRooms);
System.out.println(item.getClass() + " has InternalRoom #" + internalRoomIndex);
item.InternalRoom.portalItem = item;
}
if (item.isDevice())
{
Device device = (Device) item;
for (int b=0; b<device.ports.length; b++)
device.ports[b].myDevice = device;
}
}
Item item = (Item) items.elementAt(orgNumItems);
gameCursor.carrying = item;
item.carriedBy = gameCursor;
s.close();
in.close();
File f=new File(filename);
f.delete();
}
catch (FileNotFoundException e)
{
System.out.println("File Not Found");
roomdisplay.timer.start();
return;
}
catch (IOException e)
{
System.out.println("IO Exception");
System.out.println(e.getMessage());
e.printStackTrace();
return;
}
roomdisplay.timer.start();
// Remove all unnecessary Materials
for (int a=0; a< materials.size()-1; a++)
for (int b=a+1; b<materials.size(); b++)
{
Material mat1 = (Material) materials.elementAt(a);
Material mat2 = (Material) materials.elementAt(b);
if (mat1.equals(mat2))
{
materials.remove(mat2);
for (int c=0; c<rooms.size(); c++)
{
Room room = (Room) rooms.elementAt(c);
for (int Y=0; Y<12; Y++)
for (int X=0; X<20; X++)
{
if (room.RoomArray[Y][X] == b)
room.RoomArray[Y][X] = a;
if (room.RoomArray[Y][X] > b)
room.RoomArray[Y][X]-=1;
}
}
b--;
}
}
for (int a=orgNumItems; a<items.size(); a++)
{
Item item = (Item) items.elementAt(a);
item.GenerateIcons();
if (item.getClass().toString().endsWith("SmallChip"))
{
SmallChip sc = (SmallChip) item;
String chipfilename = new String("tmp"+(a-orgNumItems)+".chip");
sc.LoadChip(chipfilename);
File f=new File(chipfilename);
f.delete();
}
}
}
public void InitSounds()
{
for (int a=0; a<soundFiles.length; a++)
sounds.put(soundFiles[a], new SoundClip(soundFiles[a]));
// sounds.addElement(new SoundClip("attach.WAV"));
// sounds.addElement(new SoundClip("detatch.WAV"));
// sounds.addElement(new SoundClip("pickup.WAV"));
// sounds.addElement(new SoundClip("drop.WAV"));
// sounds.addElement(new SoundClip("beep.WAV"));
// sounds.addElement(new SoundClip("bump.WAV"));
// sounds.addElement(new SoundClip("charge.WAV"));
// sounds.addElement(new SoundClip("discharge.WAV"));
// sounds.addElement(new SoundClip("burn.WAV"));
// sounds.addElement(new SoundClip("liberty.mid"));
// sounds.addElement(new SoundClip("sp001.wav"));
// sounds.addElement(new SoundClip("teleport.WAV"));
// sounds.addElement(new SoundClip("transport.WAV"));
}
public void PlaySound(Room room, String soundname)
{
if (roomdisplay.useSounds==false)
return;
boolean flag = true;
if (currentViewer != null)
if (room != currentViewer.room)
flag = false;
if(flag)
{
// for (int a=0; a<sounds.size(); a++)
// {
// SoundClip soundclip = (SoundClip) sounds.elementAt(a);
// if (soundname == soundclip.filename)
// soundclip.audioClip.play();
// }
System.out.println("Playing sound " + soundname);
SoundClip soundClip = sounds.get(soundname);
if (soundClip != null)
soundClip.audioClip.play();
System.out.println("Done");
}
}
public void Init()
{
// Generate all Room Material Arrays
for (int a=0; a<rooms.size(); a++)
{
Room room = (Room) rooms.elementAt(a);
room.GenerateArray();
}
// Randomize the level
Initializer initializer=null;
for (int a=0; a<items.size(); a++)
{
Item item = (Item) items.elementAt(a);
if (item.getClass().toString().endsWith("Init"))
{
initializer = (Initializer) item;
initializer.Init();
}
}
}
}

View File

@@ -0,0 +1,341 @@
package com.droidquest.levels;
import java.awt.Color;
import java.io.File;
import com.droidquest.Room;
import com.droidquest.RoomDisplay;
import com.droidquest.avatars.GameCursor;
import com.droidquest.avatars.HelpCam;
import com.droidquest.decorations.Arrow;
import com.droidquest.items.BlueRobot;
import com.droidquest.items.Crystal;
import com.droidquest.materials.Material;
import com.droidquest.materials.Portal;
public class MainMenu extends Level
{
public MainMenu(RoomDisplay rd)
{
super(rd);
// Material 0, Blank
materials.addElement(new Material(true, false));
// Material 1, White Wall
materials.addElement(new Material(new Color(255,255,255),false, true));
// Material 2, Green Wall
materials.addElement(new Material(new Color(0,255,0),false, true));
// Material 3, Red Wall
materials.addElement(new Material(new Color(255,0,0),false, true));
// Material 4, Blue Wall
materials.addElement(new Material(new Color(0,0,255),false, true));
// Material 5, Portal to RO game
materials.addElement(new Portal("RO1.lvl",false, true));
// Material 6, Portal to RO Lab
materials.addElement(new Portal("ROLab.lvl",false, true));
// Material 7, Portal to RO tutorial A
materials.addElement(new Portal("ROTutA.lvl",false, true));
// Material 8, Portal to RO tutorial B
materials.addElement(new Portal("ROTutB.lvl",false, true));
// Material 9, Portal to RO tutorial C
materials.addElement(new Portal("ROTutC.lvl",false, true));
// Material 10, Portal to RO tutorial D
materials.addElement(new Portal("ROTutD.lvl",false, true));
// Material 11, Portal to RO tutorial E
materials.addElement(new Portal("ROTutE.lvl",false, true));
// Material 12, Portal to RO tutorial F
materials.addElement(new Portal("ROTutF.lvl",false, true));
// Material 13, Portal to RO Tutorial 3
materials.addElement(new Portal("ROTut3.lvl",false, true));
// Material 14, Portal to EndGame 1
materials.addElement(new Portal("ROEndGame.lvl", true, true));
// Material 15, Portal to RO Level 6
materials.addElement(new Portal("RO6.lvl",true, true));
// Material 7, Portal to RO Tutorial 1
// materials.addElement(new Portal("ROTut1.lvl",false, true));
// Material 8, Portal to RO Tutorial 2
// materials.addElement(new Portal("ROTut2.lvl",false, true));
// Material 9, Portal to RO Tutorial 3
// materials.addElement(new Portal("ROTut3.lvl",false, true));
// Material 10, Portal to RO Level 2
// materials.addElement(new Portal("RO2.lvl",true, true));
// Material 11, Portal to RO Level 3
// materials.addElement(new Portal("RO3.lvl",true, true));
// Material 12, Portal to RO Level 4
// materials.addElement(new Portal("RO4.lvl",true, true));
// Material 13, Portal to RO Level 5
// materials.addElement(new Portal("RO5.lvl",true, true));
// Material 14, Portal to RO Level EndGame
// materials.addElement(new Portal("ROEndGame.lvl",true, true));
// Room 0, Help Screen
// Room 1, Credits
// Room 2, Credits part 2
// Room 3, Credits part 3
// Room 4, Title, Entry Point
// Room 5, Saved Games List
// Room 6, New Games List
for (int a=0; a<10; a++)
rooms.addElement(new Room());
{ // Room 0: Help Screen
Room room = (Room) rooms.elementAt(0);
room.AddTextBox("Droid Quest Temporary Cheats", 4*28,2*32, 500);
room.AddTextBox("Q = Quicken the Animation Timer", 2*28,4*32, 500);
room.AddTextBox("W = Slow the Animation Timer", 2*28,5*32, 500);
room.AddTextBox("M = Memory Report", 2*28,6*32, 500);
room.AddTextBox("(To go to Main Menu, press Return.)", 70, 11*32, 500);
}
{ // Room 1: Credits
Room room = (Room) rooms.elementAt(1);
room.AddTextBox("Credits:", 7*28, 2*32, 500);
room.AddTextBox("Original Robot Odyssey by Mike Wallace and Leslie Grimm, (C) The Learning Company",
2*28,3*32, 500);
room.AddTextBox("Original Atari Adventure by Warren Robinett, (C) Atari International",
2*28,6*32, 500);
room.AddTextBox("DroidQuest (C) 2000 Thomas Foote", 2*28,8*32, 500);
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,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 2: Credits 2
Room room = (Room) rooms.elementAt(2);
room.AddTextBox("Special thanks to...", 2*28,2*32, 500);
room.AddTextBox("Eric Welsh Eric Jacobs Vladimir Dimitrov Nathan Woods John Isidoro Derek Pechel Jeffery Hanke Matheww Russo Jim Veneskey Erik Santiso Michael Mol",2*28,4*32,220);
room.AddTextBox("Che Fox illuvius lexspoon shuffles Locklainn samdroid", 12*28,4*32, 200);
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;
LinkRoomsUpDown(1,2);
}
{ // Room 3: Credits 3
Room room = (Room) rooms.elementAt(3);
room.AddTextBox("Christopher Walkup, age 6 Billy Leete, age 5", 2*28, 4*32, 350);
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,2,2,2,2,2,2,2,2,2,2,2,2}
};
room.RoomArray = table;
LinkRoomsUpDown(2,3);
}
{ // Room 4: Title
Room room = (Room) rooms.elementAt(4);
room.AddGraphix("DQlogo.gif",2*28,1*32);
room.AddTextBox("Credits", 2*28,6*32+8, 500);
room.AddArrow(0,6*32,Arrow.DIR_LEFT, 28, Color.white);
room.AddTextBox("Saved Games", 9*28,10*32, 80);
room.AddTextBox("Games", 450,6*32+8, 500);
room.AddArrow(559,6*32,Arrow.DIR_RIGHT, 28, Color.white);
room.AddTextBox("{000,000,000} Version 2.7", 0,16,500);
if (cheatmode)
room.AddTextBox("{BIG} CHEAT ENABLED!", 91, 8*32, 500);
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;
LinkRoomsLeftRight(1,4);
}
{ // Room 5: Save games
Room room = (Room) rooms.elementAt(5);
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;
LinkRoomsUpDown(4,5);
}
{ // Room 6: Robot Odyssey
Room room = (Room) rooms.elementAt(6);
room.AddTextBox("{BIG} ROBOT ODYSSEY I", 2*28,2*32, 600);
room.AddTextBox("The Original Game", 2*28,3*32, 500);
room.AddTextBox("Robotropolis", 8*28,6*32, 500);
room.AddTextBox("Innovation Lab", 8*28,8*32, 500);
room.AddTextBox("Tutorials", 8*28, 11*32, 300);
room.AddArrow(10*28, 383, Arrow.DIR_DOWN, 32, Color.white);
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},
{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,5,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,6,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,0,0,0,0,4,4,4,4,4,4,4,4}
};
room.RoomArray = table;
LinkRoomsLeftRight(4,6);
}
{ // Room 7: RO Tutorials
Room room = (Room) rooms.elementAt(7);
int[][] table = {
{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, 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, 7, 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, 8, 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, 9, 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,10, 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, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4}
};
room.RoomArray = table;
room.AddTextBox("Robot Anatomy", 3*28, 4*32, 500);
room.AddTextBox("Robot Wiring", 3*28, 6*32, 500);
room.AddTextBox("Sensors", 3*28, 8*32, 500);
room.AddTextBox("Toolkit", 3*28, 10*32, 500);
LinkRoomsUpDown(6,7);
}
{ // Room 8: RO Tutorials
Room room = (Room) rooms.elementAt(8);
int[][] table = {
{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, 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,11, 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,12, 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,13, 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("Robot Circuits", 3*28, 4*32, 500);
room.AddTextBox("Robot Teamwork", 3*28, 6*32, 500);
room.AddTextBox("Chip Design", 3*28, 8*32, 500);
LinkRoomsUpDown(7,8);
}
{ // Room 9: Secret Room
Room room = (Room) rooms.elementAt(9);
room.SetMaterialOutline(0,0,19,11,1);
room.SetMaterial(2,2,14);
room.SetMaterial(2,4,15);
LinkRoomsUpDown(9,4);
items.addElement(new BlueRobot(2*28, 6*32,room));
items.addElement(new Crystal(5*28, 6*32,room,100000));
}
gameCursor = new GameCursor(9*28,6*32,(Room) rooms.elementAt(4));
helpCam = new HelpCam( (Room) rooms.elementAt(0));
items.addElement(gameCursor);
items.addElement(helpCam);
player = gameCursor;
currentViewer = player;
File f = new File("ROlevels/");
if (!f.exists())
f.mkdir();
String[] files = f.list();
int pageIndex=5;
for (int a=0; a<files.length; a++)
{
if (a>4 && 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);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -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;
}
}

View File

@@ -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;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}