Examples of GdlExpression


Examples of stanfordlogic.gdl.GdlExpression

     */
    @Override
    protected void execute() throws IOException
    {
        // Tell the game manager that the game ended, passing in the previous moves
        GdlExpression prevMoves = content_.getElement(2);
       
        if (prevMoves instanceof GdlList == false) {
            logger_.severe(gameId_ + ": Previous move list in STOP message was not a GDL list!");
            finish();
            return;
View Full Code Here

Examples of stanfordlogic.gdl.GdlExpression

        {
            throw new IllegalArgumentException( "PLAY request should have exactly three arguments, not "
                    + content_.getSize() );
        }
       
        GdlExpression prevExp = content_.getElement(2);
        final GdlList prevMoves;
       
        StringBuilder prevMovesStr = new StringBuilder();
       
        if ( prevExp instanceof GdlList )
        {
            prevMoves = (GdlList) content_.getElement(2);
           
            prevMovesStr.append(" Previous moves: ");
           
            for ( GdlExpression exp: prevMoves )
            {
                prevMovesStr.append( exp.toString() );
                prevMovesStr.append("  ");
            }
        }
        else
        {
            // make sure it's an atom containing NIL
            if ( prevExp instanceof GdlAtom == false || prevExp.equals( GameManager.getParser().TOK_NIL ) == false )
                throw new IllegalArgumentException("PLAY request doesn't have LIST and doesn't have NIL atom as prev-moves!");
            prevMoves = null; // empty prev moves
        }
       
        final Experiment exp = ExperimentManager.getExp(gameId_);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.