Exemplo n.º 1
0
        public static void Build()
        {
            GetTiles("A", 9);
            GetTiles("B", 9);
            GetTiles("C", 9);
            GetTiles("D", 4);
            GetTiles("E", 3);

            //Shuffle
            for (int i = 0; i < 1000; i++)
            {
                int r = StandAlone.Random(0, MJStacks.Count - 1);
                Swap <String>(MJStacks, r, (2 * r) % MJStacks.Count);
            }


            //Get Hands
            for (int i = 0; i < 34; i++)
            {
                GetTiles();
            }


            for (int i = 0; i < 3; i++)
            {
                GetMarket();
            }

            MyHands.Sort();
        }
Exemplo n.º 2
0
 public static void Pay()
 {
     for (int i = 0; i < SelectedDeal.Count; i++)
     {
         if (MyHands.Hands.Components.Contains(SelectedDeal[i]))
         {
             MyHands.Hands.Components.Remove(SelectedDeal[i]);
         }
         if (MyHands.Tiles.Components.Contains(SelectedDeal[i]))
         {
             MyHands.Tiles.Components.Remove(SelectedDeal[i]);
         }
     }
     while (SelectedDeal.Count > 0)
     {
         SelectedDeal.RemoveAt(0);
     }
     MyHands.Add(MyHands.Codes[MyHands.Market[SelectedMarketIndex]], MyHands.Hands);
 }
Exemplo n.º 3
0
 public static void GetMarket()
 {
     MyHands.Add(MJStacks[0], MyHands.Market);
     MJStacks.RemoveAt(0);
 }
Exemplo n.º 4
0
 public static void GetTiles()
 {
     MyHands.Add(MJStacks[0], MyHands.Tiles);
     MJStacks.RemoveAt(0);
 }