Exemple #1
0
    /// <summary>
    /// Method for translating current state of system to list of commands
    /// </summary>
    /// <returns></returns>
    public List <Command> translate()
    {
        List <Command> ret = new List <Command>();

        foreach (Atom atom in currState)
        {
            Debug.Log(atom.GetLetter());
            FutureCommand listing = dictionary.GetOrElse(atom.GetLetter(), new FutureCommand("do nothing", new List <Equation>()));
            ret.Add(listing.evaluate(atom.GetParameters()));
        }

        return(ret);
    }
Exemple #2
0
    /// <summary>
    /// Method for translating current state of system to list of commands
    /// </summary>
    /// <returns></returns>
    public List <Command> translate()
    {
        List <Command> ret = new List <Command>();

        foreach (Atom atom in currState)
        {
            Debug.Log(atom.Letter);
            FutureCommand listing = dictionary[atom.Letter];
            ret.Add(listing.evaluate(atom.Parameters));
        }

        return(ret);
    }
 public FutureCommandConfigurator(FutureCommand <TRequest, TCommand> command)
 {
     _command = command;
 }