/// <summary> /// Création d'un message d'information associé à un empochement de pot /// </summary> /// <param name="listeJoueursEmpochantPot">La liste des joueurs</param> /// <param name="montantPotEmpoche">Le montant du pot</param> public MessageInfo(List <Joueur> vainqueurs, Combinaison comb, int montantPotEmpoche) { this.TypeMessage = MessageJeu.PotEmpoche; this.JoueursEmpochantPot = vainqueurs; this.MontantPotEmpoche = montantPotEmpoche; this.CombinaisonGagnante = comb; }
/// <summary> /// Création d'un message d'information associé à un empochement de pot /// </summary> /// <param name="listeJoueursEmpochantPot">La liste des joueurs</param> /// <param name="montantPotEmpoche">Le montant du pot</param> public MessageInfo(Joueur vainqueur, Combinaison comb, int montantPotEmpoche) { this.TypeMessage = MessageJeu.PotEmpoche; this.CombinaisonGagnante = comb; this.MontantPotEmpoche = montantPotEmpoche; this.JoueursEmpochantPot = new List <Joueur>(); this.JoueursEmpochantPot.Add(vainqueur); }
public string TraduireCombinaison(Poker.Interface.Metier.Combinaison comb) { string name = string.Empty; switch (comb.TypeCombinaison) { case TypeCombinaison.Carte: name = CardName(comb.MainGagnante[0], true, false); break; case TypeCombinaison.Paire: name = "a pair of " + CardName(comb.MainGagnante[0], false, true); break; case TypeCombinaison.DoublePaire: name = "a " + CardName(comb.MainGagnante[0], false, true) + "-" + CardName(comb.MainGagnante[2], false, true); break; case TypeCombinaison.Brelan: name = "a three of a kind : " + CardName(comb.MainGagnante[0], false, true); break; case TypeCombinaison.Quinte: name = "a straight to " + CardName(comb.MainGagnante[0], false, false); break; case TypeCombinaison.Couleur: name = "a flush to " + ColorName(comb.MainGagnante[0]); break; case TypeCombinaison.Full: name = "a full " + CardName(comb.MainGagnante[0], false, true) + "-" + CardName(comb.MainGagnante[3], false, true); break; case TypeCombinaison.Carre: name = "a four of a kind : " + CardName(comb.MainGagnante[0], false, true); break; case TypeCombinaison.QuinteFlush: name = "a straight Flush to " + CardName(comb.MainGagnante[0], false, false) + " of " + ColorName(comb.MainGagnante[0]); break; } return(name); }
/// <summary> /// Traduction d'une combinaison /// </summary> /// <param name="comb"></param> /// <returns></returns> public string TraduireCombinaison(Poker.Interface.Metier.Combinaison comb) { string nom = string.Empty; switch (comb.TypeCombinaison) { case TypeCombinaison.Carte: nom = NomCarte(comb.MainGagnante[0], true, false, false); break; case TypeCombinaison.Paire: nom = "une paire " + NomCarte(comb.MainGagnante[0], false, true, true); break; case TypeCombinaison.DoublePaire: nom = "une double paire " + NomCarte(comb.MainGagnante[0], false, false, false) + "-" + NomCarte(comb.MainGagnante[2], false, false, false); break; case TypeCombinaison.Brelan: nom = "un brelan " + NomCarte(comb.MainGagnante[0], false, true, true); break; case TypeCombinaison.Quinte: nom = "une quinte " + NomCarte(comb.MainGagnante[0], true, true, false); break; case TypeCombinaison.Couleur: nom = "une couleur à " + NomCouleur(comb.MainGagnante[0]); break; case TypeCombinaison.Full: nom = "un full " + NomCarte(comb.MainGagnante[0], false, false, false) + "-" + NomCarte(comb.MainGagnante[3], false, false, false); break; case TypeCombinaison.Carre: nom = "un carré " + NomCarte(comb.MainGagnante[0], false, true, true); break; case TypeCombinaison.QuinteFlush: nom = "une quinte Flush " + NomCarte(comb.MainGagnante[0], true, true, false) + " de " + NomCouleur(comb.MainGagnante[0]); break; } return(nom); }