while(1) {
fork();
}
| 1 | EH | DV | AG | RED | new Color(1.0f,0.0f,0.0f) |
| 2 | JW | SL | EL | GREEN | new Color(0.0f,1.0f,0.0f) |
| 3 | MA | YZ | LU | BLUE | new Color(0.0f,0.0f,1.0f) |
| 4 | AR | LG | HF | YELLOW | new Color(1.0f,1.0f,0.0f) |
| 5 | MM | BB | AN | CYAN | new Color(0.5f,1.0f,1.0f) |
| 6 | VS | PG | VD | PURPLE | new Color(1.0f,0.5f,1.0f) |
| 7 | YS | MB | AS | ORANGE | new Color(1.0f,0.8f,0.3f) |
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:
In addition, a targzipped version of the directory is also available in that directory. You can access the targzipped file directly at:
Thursday, November 13th Absent: MM
Tuesday, November 18th Absent: AN PG YS
Thursday, November 20th Absent: AN YS
Tuesday, November 25th Absent: MB AS