Exemplo n.º 1
0
 public Hare(int currentPosition, int lane, string name)
 {
     CurrentPosition = currentPosition;
     Lane            = lane;
     Name            = name;
     RunnerSymbol    = "H";
     MoveDescription = $"{Name} is READY! SET! GO!";
     AllRunners.Add(this);
 }
Exemplo n.º 2
0
 public Tortoise(int currentPosition, int lane, string name)
 {
     base.CurrentPosition = currentPosition;
     base.Lane            = lane;
     base.Name            = name;
     base.RunnerSymbol    = "T";
     base.MoveDescription = $"{base.Name} is ready! Set! Go!";
     AllRunners.Add(this);
 }
Exemplo n.º 3
0
        public async Task LoadDataAsync(MasterDetailsViewState viewState)
        {
            Runners.Clear();

            var data = await DataService.GetRunnersAsync();

            foreach (var item in data)
            {
                Runners.Add(item);
                AllRunners.Add(item);
            }

            if (NewRunnerSelectedService.NewRunner)
            {
                SetNewRunner(NewRunnerSelectedService.runner);
                NewRunnerSelectedService.NewRunner = false;
            }

            else if (viewState == MasterDetailsViewState.Both)
            {
                Selected = Runners.First();
            }
        }