public class AgentFactory
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static int |
count
The Agent counter used for assigning the numerical portion of an ObjID
|
private static int |
INITIAL_ENERGY
The initial energy constant of an Agent
|
private static int |
X
The initial x value constant of an Agent
|
| Modifier | Constructor and Description |
|---|---|
private |
AgentFactory()
Restricts factory instantiation since all class data is static
|
| Modifier and Type | Method and Description |
|---|---|
static Agent |
produce(java.lang.String name,
java.lang.String address,
java.awt.Color bgColor,
java.awt.Color fgColor,
Image image,
java.util.Map<ObjID,NetPuzlObject> cache)
Produces an Agent with a unique object ID and the given parameters
|
private static int count
private static final int INITIAL_ENERGY
private static final int X
private AgentFactory()
public static Agent produce(java.lang.String name, java.lang.String address, java.awt.Color bgColor, java.awt.Color fgColor, Image image, java.util.Map<ObjID,NetPuzlObject> cache)
name - The name to produce an Agent withaddress - The text (IP adress) to produce the Agent withbgColor - The background color to produce the Agent withfgColor - The foreground color to produce the Agent withimage - The Image to produce the Agent withcache - The Map to cache the Agent in