Exemplo n.º 1
0
 // Constructors
 public Player(int starting_funds, int buy_in, int big_blind, int small_blind, int ante, Card[] starting_hand, Deck deck, int max_size, string name, bool is_male)
 {
     money_p = new Money(starting_funds, buy_in, big_blind, small_blind, ante);
      hand_p = new Hand(starting_hand, deck, max_size);
      is_out_p = false;
      folded_p = false;
      all_in_p = false;
      refresh_bluff();
      name_p = name;
      is_male_p = is_male;
      n_times_this_turn = 0;
      tell_type_p = (Tell_Types)rand.Next((int)Tell_Types.END);
      tell_p = decide_tell();
      last_action_p = Actions.CALL;
      last_bet_p = 0;
 }
Exemplo n.º 2
0
        protected int get_tell_tier(Tell_Types tell_type, string tell)
        {
            string[] tell_arr = get_tell_array(tell_type);

            int tier = 0;

            for (int i = 0; i < tell_arr.Length; i++)
            {
                if (tell.Equals(tell_arr[i]))
                {
                    tier = i;
                    break;
                }
            }

            return(tier);
        }
Exemplo n.º 3
0
        protected int get_tell_tier(Tell_Types tell_type, string tell)
        {
            string[] tell_arr = get_tell_array(tell_type);

             int tier = 0;

             for (int i = 0; i < tell_arr.Length; i++)
             {
            if (tell.Equals(tell_arr[i]))
            {
               tier = i;
               break;
            }
             }

             return tier;
        }
Exemplo n.º 4
0
        protected string[] get_tell_array(Tell_Types tell_type)
        {
            const int n_tiers = 4;
             string[] tell_array = new string[n_tiers];
             tell_array[0] = "is doing nothing out of the ordinary";

             string possessive = "his";
             string referral = "he";
             if(!is_male){
            possessive = "her";
            referral = "she";
             }

             // set the other tiers
             switch (tell_type)
             {
            case (Tell_Types.SCRATCH_EAR):
               tell_array[1] = String.Format("taps {0} ear", possessive);
               tell_array[2] = String.Format("scratches {0} ear", possessive);
               tell_array[3] = String.Format("tugs lightly on {0} ear", possessive);
               break;
            case (Tell_Types.BEND_CARD):
               tell_array[1] = String.Format("is rubbing one of {0} cards with {0} thumb and forefinger", possessive);
               tell_array[2] = String.Format("is lightly tugging {0} cards", possessive);
               tell_array[3] = String.Format("is squeezing {0} card and bending it slightly", possessive);
               break;
            case (Tell_Types.RUB_NOSE):
               tell_array[1] = String.Format("sniffs and shifts a bit");
               tell_array[2] = String.Format("rubs {0} nose for a second", possessive);
               tell_array[3] = String.Format("is sniffing uncontrollably");
               break;
            case (Tell_Types.LOOK_AROUND):
               tell_array[1] = String.Format("glances around at the other players when they aren't looking");
               tell_array[2] = String.Format("darts quick glances around the table");
               tell_array[3] = String.Format("is intently watching your every move");
               break;
            case (Tell_Types.SHIFT_UNCOMFORTABLY):
               tell_array[1] = String.Format("sniffs and shifts a bit");
               tell_array[2] = String.Format("scoots back in {0} chair a bit", possessive);
               tell_array[3] = String.Format("shifts uncomfortably until {0} sees you looking", referral);
               break;
            case (Tell_Types.BITE_LIP):
               tell_array[1] = String.Format("makes a bit of an odd face");
               tell_array[2] = String.Format("is nibbling on {0} lip", possessive);
               tell_array[3] = String.Format("is chewing on {0} lip", possessive);
               break;
            case (Tell_Types.TAP_FINGER):
               tell_array[1] = String.Format("is tapping one of the cards {0}'s staring at", referral);
               tell_array[2] = String.Format("taps the table impatiently");
               tell_array[3] = String.Format("drums {0} fingers on the table regularly", possessive);
               break;
            case (Tell_Types.CLEAR_THROAT):
               tell_array[1] = String.Format("quietly clears {0} throat", possessive);
               tell_array[2] = String.Format("clears {0} throat", possessive);
               tell_array[3] = String.Format("sharply and suddenly clears {0} throat", possessive);
               break;
            case (Tell_Types.LEAN_BACK):
               tell_array[1] = String.Format("leans back slightly");
               tell_array[2] = String.Format("leans back");
               tell_array[3] = String.Format("leans back with a confident smile");
               break;
            case(Tell_Types.COVER_MOUTH):
               tell_array[1] = String.Format("touches {0} lower lip", possessive);
               tell_array[2] = String.Format("slightly covers {0} mouth in a thoughtful way", possessive);
               tell_array[3] = String.Format("covers {0} mouth intently", possessive);
               break;
            default:
               tell_array[1] = String.Format("is doing something slightly out of the ordinary");
               tell_array[2] = String.Format("is doing something pretty out of the ordinary");
               tell_array[3] = String.Format("is doing something really out of the ordinary");
               break;
             }

             return tell_array;
        }
Exemplo n.º 5
0
        protected string[] get_tell_array(Tell_Types tell_type)
        {
            const int n_tiers = 4;

            string[] tell_array = new string[n_tiers];
            tell_array[0] = "is doing nothing out of the ordinary";

            string possessive = "his";
            string referral   = "he";

            if (!is_male)
            {
                possessive = "her";
                referral   = "she";
            }

            // set the other tiers
            switch (tell_type)
            {
            case (Tell_Types.SCRATCH_EAR):
                tell_array[1] = String.Format("taps {0} ear", possessive);
                tell_array[2] = String.Format("scratches {0} ear", possessive);
                tell_array[3] = String.Format("tugs lightly on {0} ear", possessive);
                break;

            case (Tell_Types.BEND_CARD):
                tell_array[1] = String.Format("is rubbing one of {0} cards with {0} thumb and forefinger", possessive);
                tell_array[2] = String.Format("is lightly tugging {0} cards", possessive);
                tell_array[3] = String.Format("is squeezing {0} card and bending it slightly", possessive);
                break;

            case (Tell_Types.RUB_NOSE):
                tell_array[1] = String.Format("sniffs and shifts a bit");
                tell_array[2] = String.Format("rubs {0} nose for a second", possessive);
                tell_array[3] = String.Format("is sniffing uncontrollably");
                break;

            case (Tell_Types.LOOK_AROUND):
                tell_array[1] = String.Format("glances around at the other players when they aren't looking");
                tell_array[2] = String.Format("darts quick glances around the table");
                tell_array[3] = String.Format("is intently watching your every move");
                break;

            case (Tell_Types.SHIFT_UNCOMFORTABLY):
                tell_array[1] = String.Format("sniffs and shifts a bit");
                tell_array[2] = String.Format("scoots back in {0} chair a bit", possessive);
                tell_array[3] = String.Format("shifts uncomfortably until {0} sees you looking", referral);
                break;

            case (Tell_Types.BITE_LIP):
                tell_array[1] = String.Format("makes a bit of an odd face");
                tell_array[2] = String.Format("is nibbling on {0} lip", possessive);
                tell_array[3] = String.Format("is chewing on {0} lip", possessive);
                break;

            case (Tell_Types.TAP_FINGER):
                tell_array[1] = String.Format("is tapping one of the cards {0}'s staring at", referral);
                tell_array[2] = String.Format("taps the table impatiently");
                tell_array[3] = String.Format("drums {0} fingers on the table regularly", possessive);
                break;

            case (Tell_Types.CLEAR_THROAT):
                tell_array[1] = String.Format("quietly clears {0} throat", possessive);
                tell_array[2] = String.Format("clears {0} throat", possessive);
                tell_array[3] = String.Format("sharply and suddenly clears {0} throat", possessive);
                break;

            case (Tell_Types.LEAN_BACK):
                tell_array[1] = String.Format("leans back slightly");
                tell_array[2] = String.Format("leans back");
                tell_array[3] = String.Format("leans back with a confident smile");
                break;

            case (Tell_Types.COVER_MOUTH):
                tell_array[1] = String.Format("touches {0} lower lip", possessive);
                tell_array[2] = String.Format("slightly covers {0} mouth in a thoughtful way", possessive);
                tell_array[3] = String.Format("covers {0} mouth intently", possessive);
                break;

            default:
                tell_array[1] = String.Format("is doing something slightly out of the ordinary");
                tell_array[2] = String.Format("is doing something pretty out of the ordinary");
                tell_array[3] = String.Format("is doing something really out of the ordinary");
                break;
            }

            return(tell_array);
        }