/// <summary> /// Standard Konstruktor /// </summary> public Player() { _programm = new Programm(); _pointList = new List<Tuple<int, string, string, string, int>>(); _points = 0; _time = 0; }
/// <summary> /// Aktualisiert die ObservableCollections _targetItemsP1 und _targetItemsP2 /// </summary> /// <param name="p">Das Programm, das aktualisiert wurde</param> public void updateTargetList(Programm p) { if (p == _game.P1.Programm) { TargetItemsP1 = new ObservableCollection<Statement>(_game.P1.Programm.getActualStmNesting()); } else if (p == _game.P2.Programm) { TargetItemsP2 = new ObservableCollection<Statement>(_game.P2.Programm.getActualStmNesting()); } }
/// <summary> /// Konstruktor /// </summary> /// <param name="sortAlg">Der anzuzeigende Algorithmus</param> public ErklaerungVM(string sortAlg) { _arrayGen = new ArrayGen(); _testArray = _arrayGen.getRndArray(Config.RUNS[0]); _programm = new Programm(); switchOnAlg(sortAlg); runAnimation(); }
/// <summary> /// Konstruktor /// </summary> /// <param name="prg">Programm, dass die Animation darstellen soll.</param> public AnimationVM(Programm prg) { _maxAnimationHeight = Config.RUNS[0] * Config.RECT_MULTIPLIKATOR + 80; _timer = new DispatcherTimer(); _timer.Interval = new TimeSpan(0, 0, 0 , 0, Config.ANIMATION_TIMER); _timer.Tick += new EventHandler(animationEvent); _programm = prg; _curLogSet = _programm.Log.First.Value; _animationData = new ObservableCollection<Tuple<int,int,ObservableCollection<string>>>(); _dataSetValues = new ObservableCollection<string>(); updateAnimationData(); updateDataSetValues(); initStms(); }