コード例 #1
0
ファイル: Simulation.cs プロジェクト: kswider/Lsystems
    /// <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);
    }