All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ggp.base.util.ruleengine.StdTranslator Maven / Gradle / Ivy

The newest version!
package org.ggp.base.util.ruleengine;

import java.util.Set;

import org.ggp.base.util.gdl.grammar.GdlSentence;
import org.ggp.base.util.gdl.grammar.GdlTerm;
import org.ggp.base.util.statemachine.MachineState;
import org.ggp.base.util.statemachine.Move;

public class StdTranslator implements Translator {
    public static final StdTranslator INSTANCE = new StdTranslator();

    @Override
    public GdlTerm getGdlMove(Move move) {
        return move.getContents();
    }

    @Override
    public Move getNativeMove(MachineState state, int roleIndex, GdlTerm move) {
        return new Move(move);
    }

    @Override
    public Set getGdlState(MachineState state) {
        return state.getContents();
    }

    @Override
    public MachineState getNativeState(Set state) {
        return new MachineState(state);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy