feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using GameMessage;
|
||||
|
||||
namespace GameFix.Poker
|
||||
{
|
||||
/// <summary>
|
||||
/// 3带2张 特殊牌型
|
||||
/// 最后一手牌可以带一张或者不带
|
||||
/// </summary>
|
||||
public class CardStyle311SpecialHelper : CardStyleBaseHelper
|
||||
{
|
||||
public override int CardStyle => DataCardConst.CardStyle311;
|
||||
public override int CardCnt => 5;
|
||||
|
||||
private readonly CardStyle311Helper _cardStyle311 = new();
|
||||
private readonly CardStyle31Helper _cardStyle31 = new();
|
||||
private readonly CardStyle3Helper _cardStyle3 = new();
|
||||
|
||||
internal override bool CheckStyleNormal(CardBaseGroup group, out CardStyleInfo cardStyleInfo)
|
||||
{
|
||||
cardStyleInfo = null;
|
||||
if (group is not CardHandGroup) return false;
|
||||
bool isStyle = false;
|
||||
if (group.SelfCards.Count == _cardStyle3.CardCnt)
|
||||
isStyle = _cardStyle3.CheckStyleNormal(group, out cardStyleInfo);
|
||||
else if (group.SelfCards.Count == _cardStyle31.CardCnt)
|
||||
isStyle = _cardStyle31.CheckStyleNormal(group, out cardStyleInfo);
|
||||
else
|
||||
isStyle = _cardStyle311.CheckStyleNormal(group, out cardStyleInfo);
|
||||
if (isStyle)
|
||||
cardStyleInfo.CardStyle = CardStyle;
|
||||
return isStyle;
|
||||
}
|
||||
|
||||
internal override List<CardGroupList> GetAllEatTipGroup(CardBaseGroup group, CardStyleInfo eatStyleInfo)
|
||||
{
|
||||
if (group is not CardHandGroup) return new List<CardGroupList>();
|
||||
if (group.SelfCards.Count == _cardStyle3.CardCnt)
|
||||
return _cardStyle3.GetAllEatTipGroup(group, eatStyleInfo);
|
||||
if (group.SelfCards.Count == _cardStyle31.CardCnt)
|
||||
return _cardStyle31.GetAllEatTipGroup(group, eatStyleInfo);
|
||||
var allEatTipGroup = _cardStyle311.GetAllEatTipGroup(group, eatStyleInfo);
|
||||
return allEatTipGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user