Exemple #1
1
        public Discard(Mahjong.Replay Replay, int Round, int Player)
        {
            R = Replay;
            Rnd = R.Rounds[Round];
            this.Player = Player;

            Red = !Replay.LobbyType.HasFlag(LobbyType.NOAKA);
        }
        public int ShowSex = 0;      // show player's sex

        public PaifuGenerator(Mahjong.Replay Replay, int Round)
        {
            R = Replay;
            Rnd = R.Rounds[Round];

            Red = !Replay.LobbyType.HasFlag(LobbyType.NOAKA);

            // Replay only one game, if it need
            if (Rnd.Hands[0].Count == 0) Rnd.ReplayGame();

            for (int i = 0; i < R.PlayerCount; i++) DangerTiles[i] = null;
        }
        public BasicGameFinder(Tenhou.TenhouHashList Hashes)
        {
            // Create blank ResultList from hash table
            for (int h = 0; h < Hashes.Hashes.Count; h++ )
            {
                string Hash = Hashes.Hashes[h];
                Mahjong.Replay R = new Mahjong.Replay();

                Console.Title = String.Format("Loading {0:d}/{1:d}", h + 1, Hashes.Hashes.Count);

                if (R.LoadXml(Hash))
                {
                    Result Res = new Result();
                    Res.Replay = R;
                    Res.ReplayMark = true;

                    for (int i = 0; i < 4; i++) Res.PlayerMark[i] = true;
                    // Exclude 4th player in 3man game
                    if (R.PlayerCount == 3) Res.PlayerMark[3] = false;

                    for (int i = 0; i < R.Rounds.Count; i++)
                    {
                        bool[] Marks = new bool[4];
                        for (int j = 0; j < Res.Replay.PlayerCount; j++) Marks[j] = true;

                        Res.RoundMark.Add(true);
                        Res.HandMark.Add(Marks);
                    }

                    GameList.Add(Res);
                }
                else
                {
                    Console.WriteLine(Hash + " - not found");
                }
            }
        }