public GameTester( String kifFile, String role, int startClock, int playClock ) throws Exception
{
parser_ = GameManager.getParser();
// Load up the kif
GdlList gameDesc = parser_.parse( new FileInputStream( kifFile ) );
// if there is no role, find the first 'role' expression and use that
if ( role.length() == 0 )
{
for ( GdlExpression exp : gameDesc )
{
if ( exp instanceof GdlList )
{
GdlList l = (GdlList) exp;
if ( l.getElement(0).equals( new GdlAtom(parser_.getSymbolTable(), parser_.TOK_ROLE) ) )
{
GdlAtom roleAtom = (GdlAtom) l.getElement(1);
role = roleAtom.toString();
break;
}
}
}