public InicioViewModel() { RunTaks = true; NivelEnums = NivelEnum.GetAll <NivelEnum>().ToList(); Jogo = new JogoModel(); IniciarCommand = new Command(IniciarJogo); Notificacoes = new List <string>(); }
private void SetNivelDificuldade() { NivelDificuldade = Jogo.Nivel; if (Jogo.Nivel == NivelEnum.Aleatorio) { Random rnd = new Random(); var niveis = NivelEnum.GetAll <NivelEnum>().Where(n => n.Id > 1).ToList(); var randIndexNivel = rnd.Next(niveis.Count); NivelDificuldade = niveis[randIndexNivel]; } }