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; }
private void INIT(XmlReader Reader) { R.PlayerCount = 4; // Start new round! CurrentRound = new Mahjong.Round(); CurrentRound.Hash = R.Hash; CurrentRound.Index = R.Rounds.Count; CurrentRound.Lobby = R.Lobby; CurrentRound.LobbyType = R.LobbyType; R.Rounds.Add(CurrentRound); // Generate wall if (Generator != null) { Generator.Generate(CurrentRound.Index); CurrentRound.Wall = new Mahjong.Wall(); CurrentRound.Wall.Tiles = Generator.GetWall(); CurrentRound.Wall.Dice = Generator.GetDice(); } // Balance int[] Balance = DecompositeIntList(Reader.GetAttribute("ten")); for (int i = 0; i < 4; i++) { string Hai = Reader.GetAttribute("hai" + i.ToString()); if ((Hai.CompareTo("") == 0) && (i == 3)) { R.PlayerCount = 3; break; } // Tile list, 13 tiles int[] TileList = DecompositeIntList(Hai); CurrentRound.StartHands[i] = new Mahjong.Hand(); CurrentRound.StartHands[i].SetArray(TileList); CurrentRound.BalanceBefore[i] = Balance[i] * 100; } int[] Seed = DecompositeIntList(Reader.GetAttribute("seed")); { if (Seed != null) { // Seed: // 0: unk 3: unk // 1: renchan stick 4: unk // 2: riichi stick 5: dora pointer CurrentRound.RenchanStick = Seed[1]; CurrentRound.RiichiStick = Seed[2]; CurrentRound.FirstDora = Seed[5]; } } CurrentRound.PlayerCount = R.PlayerCount; FirstStep = true; }