1 | CM | BP | AVK | - | RED | new Color(1.0f,0.0f,0.0f) |
2 | AM | LW | AD | - | GREEN | new Color(0.0f,1.0f,0.0f) |
3 | MSS | RG | VB | - | BLUE | new Color(0.0f,0.0f,1.0f) |
4 | ZZ | HK | AR | SUV | YELLOW | new Color(1.0f,1.0f,0.0f) |
5 | BC | PJ | JCR | - | CYAN | new Color(0.5f,1.0f,1.0f) |
6 | SOV | JC | MM | - | PURPLE | new Color(1.0f,0.5f,1.0f) |
7 | EG | PV | RM | - | ORANGE | new Color(1.0f,0.8f,0.3f) |
8 | RT | JR | AG | - | PINK | new Color(1.0f,0.67f,0.67f) |
9 | PO | DJ | BB | - | 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 numPlayers() throws Exception;
public int currRound() throws Exception;
public int maxRounds() throws Exception;
public int L() throws Exception;
public int W() throws Exception;
public boolean[]
MyInfo(IFCPlayer _player)
throws Exception;
Method | Description |
numPlayers() | Number of Players |
currRound() | Current Round number |
maxRounds() | Maximum number of Rounds |
L() | Grid Width |
W() | Grid Height |
MyInfo() | Get you own information. See DumbPlayer for example. |
Player Interface
Players are required to implement the following interface:
public interface IFCPlayer extends IFCConstants, Serializable {
public void register(Friends
__amoeba) throws Exception;
public String name()
throws Exception;
public Color color()
throws Exception;
public boolean interactive()
throws Exception;
public int move(Move input)
throws Exception;
}
Method | Description |
register(Friends __amoeba) | Gives the Player a chance to get Game configuration parameters by calling the exposed methods of the Friends object __amoeba. |
name() | Returns the name of the Player. |
color() | Player's color. |
interactive() | HumanPlayer returns true, everyone else returns false. |
move(Move input) |
Move class conatins the following members: boolean[][] information; ArrayList[] friends; Both arrays are indexed by one of 9 directions as defined in IFCConstants.java information[i][j] is true when information unit j has passed through the adjacent cell i. friends[i] contains the list of players present at adjacent cell i. Note that each player has a different random view of the rest of the world now. Example: To find the players present in the cell to the top-left diagonal: index = 5; (NorthWest is number 5; see IFCConstants.java) input.friends[index] is the ArrayList containing the players present on the cell north-west to the current cell. |
Software
The full software source tree and class files are available from:
http://www.cs.columbia.edu/~kamra/CS4444/Project3/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/Project3/Software/software.tar.gz
10th November, 2004
Absent: BB DJ AG PJ