public void responderEnvido(PuntajeR puntaje) { string resp; do { Console.WriteLine(); Console.WriteLine("RESPUESTA AL ENVIDO JUGADOR " + id); Console.WriteLine("6. QUIERO"); Console.WriteLine("7. NO QUIERO"); Console.Write(">> "); puerto.envido(id); resp = readPuerto(); switch (resp) { case "6": puntaje.envido = 2; break; case "7": puntaje.envido = 1; break; default: Console.WriteLine(); Console.WriteLine("<<ERROR DEBE SELECCIONAR UNA OPCION!!!>>"); Console.WriteLine(); resp = "0"; break; } } while (resp == "0"); }
public void responderVale9(PuntajeR puntaje, Jugador jugadorIzq, ref int rendirse) { string resp; do { Console.WriteLine(); Console.WriteLine("RESPUESTA AL VALE9 JUGADOR " + id); Console.WriteLine("6. QUIERO"); Console.WriteLine("7. NO QUIERO"); Console.WriteLine("4. QUIERO Y VALE JUEGO"); Console.Write(">> "); puerto.truco(id); resp = readPuerto(); switch (resp) { case "6": puntaje.truco = 9; break; case "7": if (id == "A" || id == "C") { rendirse = 1; } else { rendirse = 2; } break; case "4": puntaje.truco = 9; jugadorIzq.responderValeJuego(puntaje, this, ref rendirse); break; default: Console.WriteLine(); Console.WriteLine("<<ERROR DEBE SELECCIONAR UNA OPCION!!!>>"); Console.WriteLine(); resp = "0"; break; } } while (resp == "0"); }
public Ronda(Jugador ja, Jugador jb, Jugador jc, Jugador jd, Turno turno, Puerto puerto) { this.puerto = puerto; this.puntaje = new PuntajeR(); this.ja = ja; this.jb = jb; this.jc = jc; this.jd = jd; ganador = new int[3]; ganador[0] = 0; ganador[1] = 0; ganador[2] = 0; this.turno = turno; rendirse = 0; }
public Carta jugarTurno(int i, PuntajeR puntaje, Jugador jugadorDer, ref int rendirse) { Carta auxc; do { Console.WriteLine("SELECCIONA UNA CARTA JUGADOR " + id); if (a != null) { Console.WriteLine("1. " + a.toString()); } if (b != null) { Console.WriteLine("2. " + b.toString()); } if (c != null) { Console.WriteLine("3. " + c.toString()); } if (puntaje.truco == 1) { Console.WriteLine("4. TRUCO"); } if (i == 0) { Console.WriteLine("5. ENVIDO"); } puerto.turno(id); Console.Write(">> "); Console.ReadLine(); switch (readPuerto()) { case "1": auxc = a; a = null; break; case "2": auxc = b; b = null; break; case "3": auxc = c; c = null; break; case "4": jugadorDer.responderTruco(puntaje, this, ref rendirse); auxc = null; break; case "5": jugadorDer.responderEnvido(puntaje); auxc = null; break; default: Console.WriteLine(); Console.WriteLine("<<ERROR DEBE SELECCIONAR UNA CARTA O TRUCO O ENVIDO!!!>>"); Console.WriteLine(); auxc = null; break; } if (rendirse != 0) { break; } } while (auxc == null); puerto.carta(auxc.id, id); return(auxc); }