Ejemplo n.º 1
0
        public static void Update()
        {
            Log.Info(nameof(Update));

            if (DataContainer.Version < 3)
            {
                TalkList.Add(56, "Wessen Führung kannst du vertrauen?");
                TalkList.Add(-1, "Unbekannt", false);
            }

            if (DataContainer.Version < 11)
            {
                // => IoSqlite.UpdateDatabase(); -- Bestehender Vortrag 24 auf -24 geändert
                TalkList.Add(24, "„Eine besonders kostbare Perle“ – habe ich sie gefunden?");
            }

            if (DataContainer.Version < 15)
            {
                DataContainer.AufgabenPersonZuordnung.Add(new AufgabenZuordnung(-1)
                {
                    PersonName = "Nicht Vorgesehen", IsVorsitz = true, IsLeser = true, Häufigkeit = 1
                });
            }

            if (DataContainer.Version < 16)
            {
                TalkList.Reset();
            }

            //auf aktuellste Version setzen = 17
            //siehe auch IoSqlite.UpdateDatabase
            DataContainer.Version = Helper.CurrentVersion;
        }
Ejemplo n.º 2
0
        public static void LoadTalks()
        {
            var myTalks = LoadDefaultTalks();

            TalkList.Clear();
            foreach (var t in myTalks)
            {
                TalkList.Add(t);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Talk、Whisperを追加登録する
        /// </summary>
        /// <param name="gameInfo"></param>
        private void ApendTalkList(GameInfo gameInfo)
        {
            LatestTalkList.Clear();

            for (int i = TalkList.Count; i < gameInfo.TalkList.Count; i++)
            {
                ExtTalk newTalk = new ExtTalk(gameInfo.TalkList[i]);
                TalkList.Add(newTalk);
                LatestTalkList.Add(newTalk);
            }

            for (int i = WhisperList.Count; i < gameInfo.WhisperList.Count; i++)
            {
                WhisperList.Add(new ExtTalk(gameInfo.WhisperList[i]));
            }

            // 発言で宣言した投票先を取得
            SaidVote = new VoteAnalyzer(DayTimeAliveAgent, TalkList, Topic.VOTE);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// This is the inner method which would be called by the outer layer to schedule the talks using engine
        /// </summary>
        /// <param name="sessionDuration">This is the session duration for the particular session, this is the capacity for the knapsack</param>
        /// <param name="talks">These are the items wih duration as values. The engine will return the best matching items using engine</param>
        /// <returns></returns>
        public ITalkList ScheduleTalksForEachTrack(int sessionDuration, IList <ITalk> talks)
        {
            try
            {
                ITalkList    talkList        = new TalkList();
                List <ITalk> talksFromEngine = engine.GetTheBestSuitableItem(sessionDuration, talks);

                foreach (var item in talksFromEngine)
                {
                    talkList.Add(item);
                }

                ChangeTheTalkStatusToSchedule(talkList, talks);
                return(talkList);
            }
            catch (Exception ex)
            {
                Log.LogInfo(ex.StackTrace);
                throw;
            }
        }
Ejemplo n.º 5
0
 public void AddTalk(Agent agent, Talk talk)
 {
     TalkList.Add(talk);
 }