while(1) {
fork();
}
| 1 | RM | SOV | PJ | - | RED | new Color(1.0f,0.0f,0.0f) |
| 2 | JR | CM | AM | - | GREEN | new Color(0.0f,1.0f,0.0f) |
| 3 | AVK | HK | MAM | - | BLUE | new Color(0.0f,0.0f,1.0f) |
| 4 | EG | PO | AR | - | YELLOW | new Color(1.0f,1.0f,0.0f) |
| 5 | RG | BC | MIM | - | CYAN | new Color(0.5f,1.0f,1.0f) |
| 6 | AG | BB | JC | - | PURPLE | new Color(1.0f,0.5f,1.0f) |
| 7 | LW | ZZ | VB | - | ORANGE | new Color(1.0f,0.8f,0.3f) |
| 8 | BP | SUV | PV | MSS | PINK | new Color(1.0f,0.67f,0.67f) |
| 9 | JCR | DJ | RT | AD | ORCHID | new Color(0.855f, 0.438f, 0.855f) |
Exposed Game Engine Methods
The following methods are exposed by the game engine and are available
to the player:
public int s() throws Exception;
public int v() throws Exception;
public int u() throws Exception;
public int M() throws Exception;
public int
K()
throws Exception;
| Method | Description |
| s() | Energy consumed for staying put. |
| v() | Energy consumed for moving or reproducing. |
| u() | Energy per unit of food. |
| M() | Maximum energy per organism |
| K() | Maximum food units per cell |
Player Interface
Players are required to implement the following interface:
public interface IFCPlayer extends IFCConstants, Serializable {
public void register(Organisms2
__fortytwo) throws Exception;
public String name()
throws Exception;
public Color color()
throws Exception;
public boolean interactive()
throws Exception;
public Move move(boolean[] foodpresent, int[] enemypresent, int foodleft, int energyleft)
throws Exception;
public int externalState()
throws Exception;
}
| Method | Description |
| register(Organisms2 __fortytwo) | Gives the Player a chance to get Game configuration parameters by calling the exposed methods of the Organisms2 object __fortytwo. |
| name() | Returns the name of the Player. |
| color() | Color of Player's organisms. |
| interactive() | HumanPlayer returns true, everyone else returns false. |
| move(boolean[] foodpresent, int[] enemypresent, int foodleft, int energyleft) |
|
| externalState() | This method is called in every round just before move(). So organisms can change their external state every round. |
Software
The full software source tree and class files are available from:
http://www.cs.columbia.edu/~kamra/CS4444/Project1/Software
In addition, a targzipped version of the directory is also available in that directory. You can access the targzipped file directly at:
http://www.cs.columbia.edu/~kamra/CS4444/Project1/Software/software.tar.gz