private void PlayerOnPlayerInitalWin(object sender, PlayerInitialWinEventArgs e) { var palyer = sender as Player; if (palyer == null) { return; } if (PlayerInitalWin != null) { PlayerInitalWin(sender, e); } }
private void GameOnPlayerInitalWin(object sender, PlayerInitialWinEventArgs e) { if (e.Type == InitialWinType.DaSiXi) { foreach (var meld in e.Melds) { Sessions.Broadcast(_player.Name + " 大四喜: " + meld.Tiles.First()); } } else if (e.Type == InitialWinType.LiuLiuShun) { Sessions.Broadcast(_player.Name + " 六六顺: " + String.Join(", ", e.Melds.Select(q => q.Tiles.First()))); } else if (e.Type == InitialWinType.QueYiSe) { Sessions.Broadcast(_player.Name + " 缺一色: " + String.Join(", ", e.LackSuits.Select(q => q.GetAttribute <DescriptionAttribute>().Description))); } else if (e.Type == InitialWinType.BanBanHu) { Sessions.Broadcast(_player.Name + " 板板胡"); } }