コード例 #1
0
 public CurrentStateWorldModelDictionary(GameManager.GameManager gameManager, List<Action> actions, List<Goal> goals)
     : base(actions)
 {
     this.GameManager = gameManager;
     this.Parent = null;
     this.Goals = new Dictionary<string, Goal>();
     foreach (var goal in goals)
     {
         this.Goals.Add(goal.Name,goal);
     }
 }
コード例 #2
0
        public CurrentStateWorldModel(GameManager.GameManager gameManager, List<Action> actions, List<Goal> goals)
            : base(actions)
        {
            this.gameManager = gameManager;
            this.Parent = null;
            this.Goals = new Goal[goals.Count];
            foreach (var key in WorldState.resourceValues.Keys)
            {
                this.ResourceEnabled[key] = WorldState.resourceValues[key];
            }
            this.PlayerResources = new Dictionary<string, object>();

            var i = 0;
            foreach (var goal in goals)
            {
                this.Goals[i] = goal;
                i++;
            }
        }