edu.columbia.cs.coms4701.agent.environments.pente
Class PentePerceptEndgame

java.lang.Object
  extended by edu.columbia.cs.coms4701.agent.environments.pente.PentePerceptEndgame
All Implemented Interfaces:
AgentPercept, PentePercept

public class PentePerceptEndgame
extends java.lang.Object
implements PentePercept

A percept received at the end of the game, indicating the winner if any.

Version:
0.1

User: aaron Date: Sep 24, 2006 Time: 6:06:22 PM

Author:
aaron@cs

Nested Class Summary
static class PentePerceptEndgame.GameResult
          Possible outcomes of a game.
 
Constructor Summary
PentePerceptEndgame(PentePerceptEndgame.GameResult theResult, java.lang.Integer theWinner)
          Constructs a new Endgame percept with the given result and winner (if any).
 
Method Summary
 PentePerceptEndgame.GameResult getGameResult()
          Returns whether the player won, lost, or draw (drew?).
 java.lang.Integer winnerTurnNumber()
          Returns the turn number of the winner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PentePerceptEndgame

public PentePerceptEndgame(PentePerceptEndgame.GameResult theResult,
                           java.lang.Integer theWinner)
Constructs a new Endgame percept with the given result and winner (if any).

Parameters:
theResult -
theWinner, - may be null if the result is Draw.
Method Detail

getGameResult

public PentePerceptEndgame.GameResult getGameResult()
Returns whether the player won, lost, or draw (drew?).

Returns:
win, lose, or draw

winnerTurnNumber

public java.lang.Integer winnerTurnNumber()
Returns the turn number of the winner.

Returns:
a turn number, i.e. int between 0 and (number of players - 1), or null for a draw.