示例#1
0
 public void cambiarTurno(int pos)
 {
     jugadorActual   = jugadores[pos];
     tableroAnterior = tablero.Copy();
     _plays.Clear();
     if (pos == 0)
     {
     }
     if (pos == 1)
     {
         ColocaFichaBotDummie();
         jugadores[pos].setFichasJugador(GetBolsaTotalFichas());
     }
     if (pos == 2)
     {
         ColocaFichaBotSmart();
         jugadores[pos].setFichasJugador(GetBolsaTotalFichas());
     }
 }
示例#2
0
        public void IniciaJuego()
        {
            tablero          = Tablero.GetTablero();
            tableroAnterior  = tablero.Copy();
            bolsaTotalFichas = Controllers.BolsaFicha.GetBolsaFichas();
            Controllers.Jugador jugador1 = new Controllers.Jugador();
            jugador1.nombre = "Humano";
            jugador1.setFichasJugador(bolsaTotalFichas);

            Controllers.Jugador jugador2 = new Controllers.Jugador();
            jugador2.setFichasJugador(GetBolsaTotalFichas());
            jugador2.nombre = "Simple Bot";
            List <Controllers.Ficha> fichasJugador2 = jugador2.fichasJugador;

            Controllers.Jugador jugador3 = new Controllers.Jugador();
            jugador3.setFichasJugador(GetBolsaTotalFichas());
            jugador3.nombre = "Brilliant Bot";
            List <Controllers.Ficha> fichasJugador3 = jugador3.fichasJugador;

            jugadores.Add(jugador1);
            jugadores.Add(jugador2);

            //jugador3.fichasJugador[0].color = "Yellow";
            //jugador3.fichasJugador[0].forma = "◆";

            //jugador3.fichasJugador[1].color = "Cyan";
            //jugador3.fichasJugador[1].forma = "◆";

            //jugador3.fichasJugador[2].color = "Green";
            //jugador3.fichasJugador[2].forma = "◆";

            jugadores.Add(jugador3);
            //jugadores.Add(jugadorPrueba);
            //int turno = 0;
            //Ficha ficha1 = new Ficha();
            //ficha1.color = "Red";
            //ficha1.forma = "▲";
            //string jsonString = JsonConvert.SerializeObject(ficha1);
            //tablero.Rows[15][15] = jsonString;
            //ficha1.color = "Red";
            //ficha1.forma = "◆";
            //tablero.Rows[14][15] = JsonConvert.SerializeObject(ficha1);
            //ficha1.color = "Blue";
            //ficha1.forma = "◆";
            //tablero.Rows[14][14] = JsonConvert.SerializeObject(ficha1);
            //tableroAnterior = tablero.Copy();
            //pruebaColocaFichasBot();

            //ColocaFicha(jugador1.fichasJugador[1], 0, 0);
            //while (true){
            //    if (turno == 3){turno = 0;}
            //    jugadores[turno].setFichasJugador(GetBolsaTotalFichas());
            //    if (jugadores[turno].fichasJugador.Count() == 0){ break; }
            //    turno++;
            //    string stop1 = "";
            //}

            //GANADOR
            //string stop = "";
            //jugador1.puntaje = 0;
            //jugador1.puntosUltimaJugada = 0;
            //jugador2.puntaje = 0;
            //jugador2.puntosUltimaJugada = 0;
            //jugador3.puntaje = 0;
            //jugador3.puntosUltimaJugada = 0;
            //jugadorActual = jugador1;
        }