package com.droidquest.devices; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import javax.swing.ImageIcon; import com.droidquest.chipstuff.Port; import com.droidquest.items.Item; import com.droidquest.items.ToolBox; public class Device extends Item { // Base Class for the Logical Devices transient Graphics g; transient static Color transparent = new Color(0,0,0,0); public Port[] ports; public int rotation; // 0=Up, 1=Right, 2=Down, 3=Left // Reference to the toolbox means this device can be put inside the ToolBox transient boolean goesInToolbox; public Device() { // Constructor rotation =0; } public void writeRef(ObjectOutputStream s) throws IOException { super.writeRef(s); for (int a=0; a