The Makers may make, and the users may use, but the players must play, with but minimal clues. - Clueless
1 | HF | MA | SL | RED | new Color(1.0f,0.0f,0.0f) |
2 | EL | AG | AR | GREEN | new Color(0.0f,1.0f,0.0f) |
3 | MB | BB | GP | BLUE | new Color(0.0f,0.0f,1.0f) |
4 | LG | EH | AS | YELLOW | new Color(1.0f,1.0f,0.0f) |
5 | JW | AN | YZ | CYAN | new Color(0.5f,1.0f,1.0f) |
6 | VS | YS | MM | PURPLE | new Color(1.0f,0.5f,1.0f) |
7 | DV | LU | VD | 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 when evaluating potential cookie placements:
public int maxRounds() throws Exception;
public int currRound() throws Exception;
public int numPlayers() throws Exception;
public int numCards() throws Exception;
public int numHiddenCards() throws Exception;
public int numCardsPerPlayer() throws Exception;
public int indexOf(IFCPlayer player) throws Exception;
public MoveResult history(int round) throws Exception;
public int[]
getPlayerList(int playerindex, IFCPlayer player)
throws Exception;
Method | Description |
maxRounds() | Returns the maximum number of rounds in the game after which the players will be forced to guess. |
currRound() | Returns the current round number. |
numPlayers() | Returns the number of Players at the start of the game. |
numCards() | Returns the total number of cards. |
numHiddenCards() | Returns the number of hidden cards. |
numCardsPerPlayer() | Returns the number of cards each player has. |
indexOf(IFCPlayer player) | Returns the index of player in the game. |
history(int round) | Returns the MoveResult object corresponding to the given round. |
getPlayerList(int index, IFCPlayer player) | Returns the card list of a player. Returns a non-null list only when player 'index' is out of game or if its the caller itself. To get your own cardlist call getPlayerList(indexOf(), this) from within your Player class, otherwise the second argument is redundant. |
Player Interface
Players are required to implement the following interface:
public interface IFCPlayer extends IFCConstants, Serializable {
public void register(Cluedo
__noclue) throws Exception;
public String name()
throws Exception;
public Color color()
throws Exception;
public boolean interactive()
throws Exception;
public Move move()
throws Exception;
public int question(int interrogator, int[] cardlist)
throws Exception;
public void answer(int interrogatee, int[] mycardlist, int response)
throws Exception;
public int[] forcedGuess()
throws Exception;
public void notifyPlayerExit(int playerexited)
throws Exception;
}
Method | Description |
register(Cluedo __noclue) | Gives the Player a chance to get Game configuration parameters by calling the exposed methods of the Cluedo object __noclue. |
name() | Returns the name of the Player. |
color() | Color of Player's cards. |
interactive() | HumanPlayer returns true, everyone else returns false. |
move() | Moves can be of two types: 1) Guess 2) Interrogation. See DumbPlayer for an example of how to specify your moves. |
question(int interrogator, int[] cardlist) | Player 'interrogator' has asked you a question with the accompanying cardlist. You have to return the value of one of the cards from the list you have, or 0 if you have none. |
answer(int interrogatee, int[] mycardlist, int response) | This the response player 'interrogatee' has given to the question you asked it with the list 'mycardlist' |
forcedGuess() | The Game is closing ! This is your last chance to make a guess. |
notifyPlayerExit(int playerexited) | Just to let you know that player 'playerexited' has left the game. You can have a look at what cards it had by calling getPlayerList(playerexited, null) |
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:
Tuesday, September 21st Absent: AN MM
Thursday, September 23rd Absent: AN MA LG
Tuesday, September 28th Absent: YZ