Beispiel #1
0
        public void fichasToLSL(Jugador j)
        {
            int i   = 0;
            LSL aux = new LSL();

            while (i != 7)
            {
                aux.insertar(j.getVectorFichas()[i], aux.ultimoNodo());
                i++;
            }
            j.setFichas(aux);
        }
Beispiel #2
0
 public void primerTurno(Jugador j1, Jugador j2, Jugador j3, Jugador j4)
 {
     foreach (Ficha f in j1.getVectorFichas())
     {
         if (f.getId() == 27)
         {
             j1.setTurno(1);
             j2.setTurno(4);
             j3.setTurno(2);
             j4.setTurno(3);
             renovarLista(j1, f);
             j1.setCantFichas(j1.getCantFichas() - 1);
             turno = 1;
             break;
         }
     }
     foreach (Ficha f in j2.getVectorFichas())
     {
         if (f.getId() == 27)
         {
             j1.setTurno(2);
             j2.setTurno(1);
             j3.setTurno(3);
             j4.setTurno(4);
             renovarLista(j2, f);
             j2.setCantFichas(j2.getCantFichas() - 1);
             Console.WriteLine(j2.getNombre());
             turno = 2;
             break;
         }
     }
     foreach (Ficha f in j3.getVectorFichas())
     {
         if (f.getId() == 27)
         {
             j1.setTurno(4);
             j2.setTurno(1);
             j3.setTurno(1);
             j4.setTurno(2);
             renovarLista(j3, f);
             j3.setCantFichas(j3.getCantFichas() - 1);
             Console.WriteLine(j3.getNombre());
             turno = 3;
             break;
         }
     }
     foreach (Ficha f in j4.getVectorFichas())
     {
         if (f.getId() == 27)
         {
             j1.setTurno(3);
             j2.setTurno(2);
             j3.setTurno(4);
             j4.setTurno(1);
             renovarLista(j4, f);
             j4.setCantFichas(j4.getCantFichas() - 1);
             Console.WriteLine(j4.getNombre());
             turno = 4;
             break;
         }
     }
 }