Ejemplo n.º 1
0
 public InicioViewModel()
 {
     RunTaks        = true;
     NivelEnums     = NivelEnum.GetAll <NivelEnum>().ToList();
     Jogo           = new JogoModel();
     IniciarCommand = new Command(IniciarJogo);
     Notificacoes   = new List <string>();
 }
Ejemplo n.º 2
0
        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];
            }
        }